Get author name of blog posted in WordPress

How to each blog post Author name in Blog anywhere using PHP in WordPress

<?php 

$author_id = $post->post_author;

echo get_the_author_meta('display_name', $author_id);
?>