Ok anyways but the code you mentioned is the core default code by WordPress itself. We just called those function to work on pages so to change the H2 heading tag on that code instead on our theme you need to customize on the main WordPress file. Or what you can do is just go to the ‘theme directory > single.php‘ then you will find calling those function on line no: 21.
the_post_navigation();
Remove that calling code and then you can use some other plugins for post navigation which do not uses H2 Headings.
Note: But we recommend you to do only after making the child theme so that your customized code won’t lose when you update the Theme Versions.
Thanks