You can close all tabs on your iPhone at once by holding down a single button in your Safari browser. Here's how to do it.
It's possible to close all the windows on your Mac computer in Safari with a keyboard shortcut or the top toolbar. Here's how to do it.