You won't be kicked unless you do something crazy inside your duty and the company's premises. But that's true that this is one of the risks of having one job, we saw this when the pandemic happened and no one can skip that. And that's why if it's a life lesson, get as much source of income as you can and while you can.
I came to the conclusion that you need to have multiple sources of income exactly when the COVID pandemic happened. I was fired from my job because the company went bankrupt. It was so hard for me at that time. There was practically no money. I had to borrow from friends and acquaintances, but not everyone gave me money, since it was difficult for them themselves. And what about my government? It simply abandoned me to my fate and did not allocate a single cent to somehow hold out in difficult times. Since then, I have many questions, but this topic is not about that.
Any of us can lose our job, but we shouldn't blame the employer, because the employment contract (if there is one) has a clause that you can be fired at any time. In this case, the employee violated the rules that contradict the employer's principles, so we shouldn't blame anyone but ourselves.
And to protect yourself from such a situation, when after being fired you are left without money, you need to have some savings, at least small ones, so that they will be enough for a few months of life until you can find another job.