A synonym for "contain"

Hello, everyone.

I read the sentence below in a news article.

“If you sneeze with a mask, the virus will be contained.”

In this sentence, does “contain” mean “stop” or “block”?
I would like to know what “contain” means in this sentence.

Any comments would be appreciated.
Thank you.

Yes, you are correct in thinking that.

Thank you, Kitosdad.

Could I ask one more question?

Instead of “contain”, is it ok to use “restrict”?
“If you sneeze with a mask, the virus will be restricted.”

Thank you in advance.

In this context more appropriate alternatives are:

If you sneeze with a mask, the virus will be –
hold back
restrained
kept under control

Thank you for your reply, Gray.