A solution without jQuery would be using the scrollend event. Here is the MDN documentation.
A code example from the documentation is:
addEventListener("scrollend", (event) => {});
Please note that as of October 2024 Safari doesn't support this event.