To some degree it's on timing. If you keep a supply ahead when something is readily available it's stocking up.One persons stocking up is another persons hoarding.
If you use something routinely and you can stock up on it it's prudent to do so.
/edit -
With the supply chain shortages a 6 month supply of everything one can store makes life easier.
If you buy more than you need of something in short supply which prevent others from getting what they need it's hoarding.
Pre-shortage I always bought toilet paper and paper towels in the biggest package I could find. Since they started to be in short supply I only pick up 4 rolls at a time.