How to write js code into script tags at cshtml file

I am trying to add some animations to my website, but unfortunately, my JS code is not working(which I am writing inside the script tags and have also included here).

I wanted the elements on the page to appear with an animation as I scroll, but my main question is how I can write the JavaScript code I want into the .cshtml file.

enter image description here