So are there any spells to protect items, like a powerful weapon, from being stolen. Like a trap spell or something that paralysis or kills anyone who touches the protected item?
You can place the item in a protected location.
This location can be protected by a variety of spells, such as:
And of course, you can also get minions to guard your stuff, such as hirelings (which bears the risk of betrayal, but you can minimize or nullify that with Geas, depending on the hireling's HP), undead created by you (ideally ones that are permanently under your control, such as those created by Finger of Death), a simulacrum, or a creature bound by Planar Binding.
You can also additionally or instead cast Drawmij's Instant Summons on the item.
This allows you to summon the item to you by crushing a sapphire. Mind you, the sapphire has to be worth at least 1000 gp, so this is pretty darn expensive, and only really makes sense for protecting magic items. You can also only cast this spell on small objects (see the spell's description).