If the company goes bankrupt, can the company security guard compensate, how much and how?

Depending on how the security guard is hired, you will get different results in different situations, depending on whether you have signed a contract or are employed by an intermediary or a company. If you sign a contract directly with the company, there should be some compensation before the contract expires. It depends on the company, and then there is nothing.