Since the EMP effect is known, this is what will happen in the event of a nuclear war. The attacking country is not going to drop a nuclear bomb directly on a city in Hiroshima-style, because it is not in the interest of leaving a destroyed and polluted country that it wants to conquer, but of disabling its infrastructure.
Of course, you can protect some electronic devices, putting them under a Faraday cage, in case of an EMP because of a nuclear bomb that explodes at high altitude, but this is not possible in large facilities, such as power plants, vehicles, water pumping stations, gas station fuel pumps, server stations, etc.. Without this, the cibilization collapses completely, without water, without transport, without food and without communication.
Short- and medium-range nuclear missiles are more frightening, since they are what is going to be used, because they do not give time for a possible defense that would give long-range missiles, since short-range ones only leave 2-3 minutes of margin, before reaching the target or the stratosphere above a country, putting off its lights.