theming – Get the top 5 recent message by taxonomy term

I am new to Drupal and I started to overwrite Twig files in Drupal 8. I wish other posts to be ranked in the top 5 by taxonomy.

Suppose I have a category in JavaScript. And I'm on the node where I post a post on JavaScript. On the same page, I need other articles on JavaScript.

I've been looking for a twig file theme / templates / content / node - article.html.twig and tried to crush it.

I even tried to debug the node using kint tool. I looked for my requirements in node and content variable.

{{kint (node)}}
{{kint (content)}}

But no success. I need suggestions for other publications of the same category in the twig file. Any suggestion is appreciated.