Are cellphones and PCs are the only things China export?
Go to the Chinese Custom page and educate yourself
In aggregate, China's electronics exports in 2024 were ~35% of the global total in exports (measured in US dollars). That still leaves ~65% for the rest of the world. China's market share in the global export of phones, tablets, laptops, TV screens, circuit boards, etc. are all in the range of 30-60%. China is clearly the biggest player in the supply chain, but does not have a monopoly.
Would banning exports of electronics cause a great deal of pain to importing countries? Yes, the supply shortage would instantly double or triple the price of most electronics. But it is not the equivalent of an embargo because there are other countries - from Vietnam to South Korea to India to Mexico to Japan - that could continue to supply the items and who would then gradually increase production. More importantly, China would do tremendous damage to itself in this situation, since the total value of its electronics exports are in the range of $1.2 trillion. That'd be a serious, serious hit to the Chinese economy.
So I'd question the idea that China could truly threaten an electronics embargo. It's only through the rare earths card (ie strictly controlling the export of any product that contains Chinese rare earths) that an electronics embargo becomes plausible and powerful. Against a "critical software" embargo from the US, the best solution remains embracing open source and making a diplomatic & financial push to build a global, parallel software ecosystem. Attempting to impose an electronics embargo (more so than is already imposed via rare earths) would be the wrong move, in my opinion.