Hate to do this since it’s off topic and I hate going off topic, but it keeps coming up: OP’s situation isn’t a catch-22.
A catch-22 is a recursive dilemma. Basically, you have two choices, but each choice requires the other choice to work. Example (and note that it’s just that): “I need a better-paying job so I can afford college, but all the jobs that pay what I need require college degrees.” This is a catch-22.
What OP has is two choices with no good outcome–a Cornelian dilemma. However, the dilemma here boils down to OP choosing between following the doctor’s orders and risking losing their job, or following the boss’s orders and risking spreading a potentially deadly illness. This isn’t a catch-22, because it isn’t recursive–choice A can be done without requiring choice B to be done first, and vice-versa.
Now since I hate topic derailment, I’m going to sum up the situation as I see it.
OP has a sickness that involves a fever as well as horrible coughs. At the same time, OP’s parents have tested possible for another, far more serious disease that also has these same symptoms–not a good sign for OP’s health. OP and their parents are ordered by a doctor to quarantine. OP calls work and explains this, and is told to come into work sick unless they test positive.
Quick note: we can reasonably assume from this info that OP is living with their parents. We can assume nothing else about their home situation from this however–OP has not elaborated further. Since nothing in the story suggests either extreme poverty or decent wealth/savings, financial hardship due to parents’ time off work, the existence or absence of mortgages or rent, or any other factors affecting the financial consequences of losing a likely well below minimum wage job, we can’t really factor these into OP’s actions or motivations.
What we do know is this: in OP’s own words, they went to work sick out of “malicious compliance.” That’s the exact term they used. OP also states that a very large portion of the restaurant’s employees came down with the more serious illness within the reasonable timeframe for OP to have been the source. And the restaurant had to close as a result.
It’s reasonable to assume OP may not have been paid while the restaurant was down either. It’s also reasonable to assume from the story’s details that OP handled food while sick, likely violating their state’s health code.
OP made the ethically wrong choice. They not only likely ended up without income for some time, they deprived others of their own income and health. And they probably broke the law in the process. Had OP not come in, they likely would have been out of a job and out of income for some time–making them no worse off than they were with the choice they made–but others likely would have kept their health and own incomes.
What OP did made no real difference to their situation, but it did put others in the same situation, something that would not have happened if they had stayed home.
A quick edit: I should point out that it would have been reasonable for OP to suspect that them coming in might cause the restaurant to close. Not just from infecting others either–health inspectors do not always schedule inspections, and if they had walked in while OP was hacking their lungs out and handling food, the restaurant may have been forced to close to decontaminate. Futhermore, this very well could have led to OP losing their food handling license, if their state requires it–which would mean they would very likely also lose their job. This is close to being a Morton’s Fork dilemma, where both choices have the same outcome–it’s only close, however, because one choice’s outcome has far more wide-reaching consequences. Ethically speaking, if faced with such a choice, you should always choose the one that would cause the least potential negative consequences–OP didn’t do this; they picked the choice with the most potential negative consequences.