Here is a nice general description from Snowflake’s documentation that summarizes clearly the answer to the question “What is a window function in SQL?”.
A query using a window function answers questions about a row’s relationship to other rows in the same window.
Here’s a link to put you in context:
https://docs.snowflake.com/en/user-guide/functions-window-using.html