Changing text depending on section H1/H2

Hi guys I would like to know what would be the easiest way to change “header 1” text depending on which section user is currently scrolling. So for example if the user is on “section 1” the text in the navbar would say “section 1” and when the user scrolls to section 2 text in the navbar would change to “section 2”.

I know it is possible to do with interaction but was wondering if there is an easier way to automate it.


Here is my site Read-Only: LINK
(how to share your site Read-Only link)