That's why the eSIM was invented. Instead of a card, the SIM is stored electronically in a dedicated chip. That's the system used in US versions of the iPhone 14 range, and many Androids have it too.