on MacOS, caffeine is a good tool but if you need it in dock (pill?) form, the amazing Amphetamine app is there for you. It'll even (if you use safari) keep you up just long enough to finish that big download. https://apps.apple.com/us/app/amphetamine/id937984704?mt=12
on Windows, the process involves taking a Power Request. A Display power request keeps the display awake, and is the overriding above most all else. It's trivial to do with a little PowerShell ( https://blog.backslasher.net/windows-awake-ps.html ) though the fine folks at Microsoft have included it in their standard set of PowerToys as Awake: https://learn.microsoft.com/en-us/windows/powertoys/awake
Last I remember, this keeps you from having a screensaver come up.