If you’re in the US, the legal counterparty for any exchange-traded (or OTC-traded-but-exchange-reported) is the Options Clearing Corporation (OCC). The idea is that it’s a consortium of many exchanges and broker-dealers that can absorb any counterparty risk should the party who sold you can option contract become insolvent / unable to deliver.