If you want to recover the spell point from a weapon, you have to remove upgrades from it. It's quite specific, but also very simple mechanics available in Minecraft Dungeons.
How can I remove the upgrade?
To remove the upgrade from the weapon, you have to salvage. You can't get spell points without destroying your weapons. You also cannot change the active enhancements and select other upgrades.
How can I salvage a weapon?
All you have to do is to open the equipment & inventory screen and choose the salvage option.
This way you get cash. The price of the item is specified in the right corner.
What are spell points used for?
Spell points are used to develop weapon enhancements. This way you can strengthen your character by adding regeneration points or a fiery trail.