YSK what to do if a nuclear bomb is about to go off near you. Very few people will be so close that they're doomed no matter what.
The area of certain death is only 1% the size of the area where you might live or might die. Don't submit to fatalism, take steps to prepare and you maximize your chance of survival.
If indoors: Fill bathtubs and any available bottles with water. Avoid windows. Check your phone for updates.
If in a car: Pull over completely, then go outside and see below.
If outside: Enter a building if possible. Avoid windows. If no buildings are available, lie facedown in a ditch or at the bottom of a slope. Do not seek shelter under or near cars. Check your phone for updates.
Phones won't work near a nuclear explosion. However, if further from the blast, phones may still work and could tell you if the attack is over or still ongoing. In yesterday's incident in Hawaii, people found out it was a false alarm because of their phones.