get_post_meta() will not work for all types of fields, complex fields will not be formatted correctly. But you can use use that function with the post ID, there is no need to get the post beforehand https://developer.wordpress.org/reference/functions/get_post_meta/