If that doesn’t do what you want, then here’s the general outline of what to do:
Follow these instructions and inherit the theme you’re currently using. This way you can update the base theme without losing your customizations.
Create a new partial called something like user/themes/mytheme/templates/partials/relatedpages.html.twig that encapsulates the logic and formatting of the “see also” section you’re trying to build.
{% include %} that new partial into whatever page template you want it to appear: Twig docs.