You may optionally purchase coverage under COBRA, typically at the full price, which your employer is required to sell you (assuming the employer meets certain criteria).
Importantly, you can purchase COBRA after the fact. When I left my last job I inquired about purchasing it because I’d have a gap of a few weeks. I was told by HR that the best thing to do was to hold off on purchasing it. If an event occurred during the gap, such as an ER visit or something similarly expensive, I could purchase COBRA and would have the expense covered.
There are also options to purchase backdated cobra if there is an emergency and you didn't purchase it initially.