The 30/30 rule is good way of knowing when you’re in danger.
Count the seconds between seeing the lightning and hearing the thunder.
If this time is 30 seconds or less then the lightning is close enough to be a threat.
Seek shelter immediately. After seeing the last lightning flash, wait 30 minutes before leaving shelter.
More than half of lightning deaths occur after the storm has passed. Stay in safe shelter until the threat has passed.