If a computer is totally frozen then you have no alternative but to long-hold to force power off.
This is the same for almost any OS.
The usual indicator on Mac is that not only the app is frozen but you can't access Force Quit & the menu bar clock has stopped. I'd always wait at least 2 or 3 minutes just to be sure it wasn't temporarily too busy to respond, during which time I keep a constant eye on the clock. I actually always have my clock showing seconds precisely for this type of occasion, under potentially extreme processor conditions. Often a process will recover, meaning you don't have to hard power-off & risk losing work.
Patience is a virtue ;)
On a Mac, you should always try to ascertain if it is indeed the entire OS - which is rare - or a single application which has hung.
Holding Cmd ⌘ Opt ⌥ Esc will bring up the Force Quit Applications dialog. This should override any process & come to the front, no matter what else has happened to the Mac. It should highlight any process that is not responding & allow you to force quit it. In many cases this will be sufficient to return to normal operation.
Only if this dialog will not pop up should you consider the Mac itself to be hung [though still keep an eye on the clock, to be sure].
Additional notes -
If you suspect it has hung, don't go clicking around like mad trying to get it to respond. If it's merely been too busy for a minute, then it will suddenly catch up & try to do all the things you were clicking blindly… not necessarily with the best results.
If you are in a fullscreen app & cannot see the menu bar, move the cursor hard to the top of the screen [even if you can't see it] & wait. if the menu bar does eventually drop into view, the Mac hasn't hung.