If you (or your spouse) lose or quit your job with health insurance when you are eligible for Medicare it is unlikely COBRA (Consolidated Omnibus Budget Reconciliation Act) will be your best choice for health insurance. Medicare does not recognize COBRA as creditable coverage as they do group health insurance. Medicare eligible individuals have 8 months to sign up for Medicare Part B once they lose their group health insurance. However, if one chooses COBRA instead and stays on it 18 months, they will be required to enroll in Part B between January 1st and March 31st. To make matters worse their Part B coverage will not begin until July 1st. Since you are not allowed to buy a Medicare Supplement or Advantage Plan without Part B, it means they will go several months with only Part A (hospital) coverage.
Also, there are penalties for not signing up for Part B when you are first eligible. Your monthly premium may go up as much as 10% for each full 12 month period you delay your enrollment in Part B.
Finally, the cost of Medicare polices is usually lower and the coverage is often better than COBRA. In North Carolina we have many low cost options for Medicare Supplements. We also have a number of zero or low premium Medicare Advantage plans.
One exception is dental or vision COBRA. Normally you can take dental or vision COBRA even if you do not take the medical. I often advise my Medicare clients to do this. Unlike Medicare plans, they can buy vision or dental plans when their dental or vision COBRA is exhausted without any penalties or restrictions.