How to render a field of a taxonomy term inside a view template?
This can be done entirely from within the Drupal UI.
If you already have access to the taxonomy term in the view, you can add the term entity directly.
This is what the core taxonomy term pages view does.
To see for yourself, go to /admin/structure/views/view/taxonomy_term on a standard Drupal 8/9 installation.
In the header, you will find Global rendered entity: Taxonomy term. If you click this to open up the settings, you will see that Drupal is loading the term based on the argument {{ raw_arguments.tid }}, which is provided by the Contextual Filter Content: Has term ID. (Check the settings there as well.)
For your own block, I would use this same technique.  You say you want to render the image, not necessarily the whole taxonomy term.  To do that, I would create a new View Mode for the term that only has the image and whatever else you want to display.
You can create a View Mode for a taxonomy term by going to the &quot;Manage Display&quot; page for the relevant taxonomy vocabulary.
Then, in Views, in the header where you are rendering the term entity, you can set the view mode to your new custom view mode.