This shit is my wheelhouse. There are 2 questions:
How likely is an EMP attack to occur?
How bad would it be if it did happen?
On "How Likely," I think the answer is "not very likely," although the % goes up each year. To perform a high-altitude EMP (HEMP) requires state-level sponsorship, sophistication, and technology. Right now that means an ICBM or something close to it. Near peer states like China know it would trigger a MAD scenario, along with how intertwined they are to our economy. If you're looking for something different to worry about, it's not China doing an EMP, it's the delivery and technology becoming commoditized enough that a shithole country or terrorist group is able to execute it. Who do we fire our nukes at when some anonymous terror group pilot a container ship in the Pacific or Atlantic or Gulf of Mexico right up to our doorstep and fires off an EMP from there? Container delivered nukes/EMPs are very possible right now. I'm a lot more worried about a country with nothing left to lose than I am China. Which is why it's in our interest for Russia's economy to be better and not so petrol based, but that's a different thread...
On "How bad," the answer is "really, really bad." At least for a HEMP. Basically, 90% of the U.S. population could die within two years. Think about it: our population is completely, totally dependent on technology. Technology drives crop production, distribution, factories, trucks, internet, everything. A really strong EMP that fries transformers, sidelines trucking, knocks out farming and production equipment...and what are we back to? An agrarian society circa early 1900's. That level of technology doesn't have the carrying capacity for 330M+ people. You saw what happened with COVID-19 and people freaking out over toilet paper, that's was nothing. Trucks go down and stores are empty in 2-3 days. Refrigeration and air conditioning, done. If you're like me and require temperature controlled medicine like insulin, you're dead within a few months. The rest die in food riots and civil unrest before the succumb to famine, and then disease. All those wonderful medical technologies and drugs we've developed? Useless or inaccessible now. Live in or near a major city? The government isn't coming to help, you're on your own. Oh, you have your own farm/ranch? Great, I hope you're more than a tank of gas from any major population center because guess who is coming for your shit - everyone. Anyway, it's not a good picture and I try not to think about it.
If you really want to go down the rabbit hole on this, read the One Second After book trilogy by William Forstchen. Just don't be surprised when you turn into a prepper.