Highlight the fixed menu item as you scroll down the page after clicking it

Hi, I’m trying to implement a feature where, when a user clicks on a fixed menu item, that item remains highlighted while the user scrolls down the page.

I need guidance on how to achieve this effect. I’ve used components to simulate the menu item change, but this removes the scroll functionality. Are there best practices or plugins that could assist with this? Any tips on how to visually represent the highlighted state in my design would also be greatly appreciated. Wondering if this might be possible using variables, but totally stuck with those!

Thanks in advance.