The figure of 500,000 includes those going bankrupt "somewhat" because of their medical bills or illness.
In 2019, Senator Bernie Sanders claimed that every year, 500,000 Americans go bankrupt because they cannot pay their medical bills. This number comes from a study conducted by the American Journal of Public Health. The 2019 study, which was titled "Medical Bankruptcy: Still Common Despite the Affordable Care Act," shows that medical issues drive an estimated 530,000 families into bankruptcy. The study showed that around 37 percent of these people went bankrupt because of medical bills. The others went bankrupt due to costs due to the illness itself (i.e. not being able to work).
As the New York Times reports, "The study itself noted that health problems can cause bankruptcies in two ways, through direct medical bills and lost income due to illness itself. The 500,000 figure includes both groups."
The Washington Post also states, "Critics say the study [...] casts too wide a net because it counts anyone who mentioned medical bills or illness among their reasons for declaring bankruptcy, not just those who said it was the main reason or a big piece. Bankruptcies typically involve multiple causes, and in some cases, medical bills may be a small piece of the pie."
On Sanders' website, he is critical of the Washington Post's analysis, saying that the "530,000 figure is an underestimate of the number of people affected by medical bankruptcies. Most bankruptcies involve more than one person - an average of about 2.7 people, often including a spouse/partner and children."
The COVID-19 pandemic has given rise to a lot of potentially dangerous misinformation. For reliable advice on COVID-19 including symptoms, prevention and available treatment, please refer to the World Health Organisation or your national healthcare authority.