Your average supermarket has limited shelf space and stocks to the level that it will reliably clear shelves before new supply turns up, or things spoil.
If a whole much of people just buy one extra pack that week, this can easily empty the shelves... Which then gets posted to social media to imply a supply problem, which then prompts people to increase their buying rate.
There's no solution to this other then education: there was no supply issue, and never was. Any "solution" would be concluding that a supermarket should devote an absurd amount of shelf space to toilet paper, just in case misinformation goes viral again.