How can I create a button to just click and go to the top of the page?

I’ve been looking for that all over the Internet but I haven’t found anything yet. What I’m looking for is for some kind of action to create a button to go to the top of the page which appears just when I start to scroll down to the bottom.
I hope someone can help
Thank you so much!

I would do this. Set up a grid with at least two rows. The first one is set at 100vh. The second one is however tall you need it with a min-height.

In the second one, I would place a button, with a margin of 90vh, set it be sticky with a vertical offset of 90vh, so that it stays at the bottom of the content, as the rest of the content moves up on scroll.

Then add a link to Anchor Top to it.

This way, no matter where you are on the list, it is always there and will always to one to the top.

I hope this helps.