A locked garage or shed is not enough on its own. Attach the bike to a properly installed ground or wall anchor using a strong chain or D-lock. At home, where the lock can stay in place, weight is less important and a heavier setup is often practical.
The anchor, lock and structure all need to be suitable. Fit the anchor to sound concrete, masonry or another approved surface, following its installation instructions, and check the ratings of the anchor and lock separately.