It's worth looking at the bottom-left side of the screen. (This assumes QGIS3)
If you set the algorithm to run in the background, you'll be able to cancel it there by clicking on the progress bar. See this tweet which includes a screencast showing how to do this.
If it's a SAGA or GRASS algorithm, these may only be able to be cancelled from the processing dialog. In some cases they check regularly to see if they've been cancelled, in some cases not at all. So a cancel may not work, or may take some time - sometimes you just need to wait!
I wouldn't advise a Force Quit on QGIS itself as you may lose work. The good news is that you can usually kill off the long-running SAGA/GRASS process using Activity Monitor. These tasks typically max out 1 cpu, so searching under 'energy' usually lists them first.
QGIS will (usually) handle an algorithm being stopped quite happily.