You can also just use the built-in Terminal app and run the built-in executable named “caffeinate”, it’s free and provided by Apple:
https://ss64.com/osx/caffeinate.html While the command has a few options, just typing the word at the terminal and hitting enter will stop your Mac from going to sleep, etc. A long time ago I worked for a company that had a terrible policy for inactivity screen lock that kept interfering with my ability to get work done, and the caffeinate command helped me prevent screen lock when I needed it to.