I want the preloader animation to appear only when the main page is first opened

I want the preloader animation to appear only when the main page is first opened.
Can someone who knows the code please elaborate on how to do this,

what should I put in liquid, or where in theme? I am an amateur and do not know much about it.

Currently, all pages have animations at the time of transition. Only the main page is needed.
Also, ideally, I would like to see the difference between “every time I open the main page” and “only the first time I open the main page” by switching it on and off.

The app already had this, but the app did not have the ability to specify these details.

Thanks

Code currently used
Some people who want to introduce loading animation may find it helpful


●theme.liquid

{% include ‘loader’ %}

●loader.liquid