There are scenarios where we want to get the current post’s author outside the query loop. There are multiple ways to do this but the simpliest way is by using get_post_field function.
Once we get the author id, we can now use the get_the_author_meta function to get the author’s meta data e.g. display name.
Ofcourse you can also use this inside the query loop.