Apple logo - system settings - find Wallpaper, then find Screen saver change inactive time to neverThis is not the whole story at all. The device still goes to sleep on some schedule.
When it does, my display goes blank (and requires 6 seconds or so to wake up). My keyboard LED also go out, indicating that it has turned off power to USB ports.
I go to System Settings -- Energy
I select "high power" instead of automatic.
I flip the switch "prevent automatic sleeping when display is off"
I go to System Settings -- Lock Screen
I select "never" for turn display off when inactive.
I select "never" for the lock screen password.
I get warned that this may wear out my display prematurely.
Yesterday I was moving back and forth between the Mac and my linux machine continually. The Mac timeout must have been something like 30 seconds because more often than not the display was off and I had to endure the 6-10 second wakeup time. Now with the screen staying on, I just use the power button on my monitor when I am done for the day. This is the way I have used my linux system for years.