There’s a simple rule of thumb. If the cheese has been sitting in your fridge for over four day and it still seems fresh, well, then it wasn’t mozzarella after all. The life of really good mozzarella is ephemeral. This cheese is damn hard to get. And when you do, it won’t last for much longer than the time to swallow it.
Industrial, reasonably good cheese may last up to a day or two once separated from the liquid it comes with.
What is erroneously called mozzarella and comes already grated in a plastic bag is bad before you even open it. Avoid that rubbish food at al times.