How to simulate sticky position

Hello,

I am wondering how can I simulate sticky position on the text here. I did put an animation top but it does not fix the page, I am wondering how can I achieve this…?