How to end game when all game objects are destroyed

Hey Everyone, any help with a script that would end game when all game objects with tag “hazards” have been destroyed from the scene. Help please… Thanks.

Here’s your help:

You need to learn how to code if you want to write a game.