Return author name as a tag using get_author

<!--?php the_author(); ?--> is an HTML comment. Means it won’t fire the PHP inside it.

As you already found out it should be <?php the_author(); ?> when placed in an PHP template file inside a so called The Loop. Which you are already doing right.

Now there’s WordPress’ Template Hierarchy. Means you need to place that snippet in the one template that’s actually rendering the content you are looking at in your browser. Taking the template hierarchy for a Single Post you can see the order WordPress is looking for existing template files in your theme.

A single post will be rendered via

  1. single-{post-type}-{slug}.php
  2. or single-{post-type}.php if 1. not found.
  3. or single.php if 1. and 2. not found.
  4. or singular.php if 1., 2. and 3. not found.
  5. or index.php as last resort.

Look for one of them, test-edit them until you found the right. Finally, there als may be a template-parts subdirectory inside your theme to render specific content. And the template you are looking for may be referenced as template part and you may need to edit just this specific template part in the end.