Correct way to register custom post type from external php file?

Adding an action doesn’t do anything except putting the callback function in the queue of the corresponding hook. It doesn’t check if the function exists, let alone load a file where the function is resident.

Only when the corresponding hook is fired PHP looks for the function. If it is not loaded by then it simply throws an error:

Warning: call_user_func_array() expects parameter 1 to be a
valid callback, function ‘yada_yada’ not found or invalid function
name in /../wp-includes/class-wp-hook.php on line 286

So, you are yourself responsible for loading the file where the function resides using include or require before the admin_enqueue_scripts hook is fired. Refer to the hook order list to check if you’re hooking timely. If you’re hooking everything into plugins_loaded you should be fine.