Closing each open application one by one isn't the fastest way to go—especially when you need to do it as quickly as possible.
In that case, you can use the cross-platform utility Captain Kill Switch, which sits in the system tray or menu bar and, with a single click on “Close All Apps,” closes all open applications without any further prompts.

The utility is available for Windows, macOS, and Linux for free and requires no configuration. Just launch it, and it works right away.