Sometimes it happens and the 3D cursor accidentally moved away from the center where it can be very annoying by placing new objects. This small guide may help a little bit to solve this problem.
Lock Cursor in Preferences
To prevent the 3D cursor from moving, open the preferences (CTRL + ALT + U) and select “Keymap” in the menu on the left.
In theoptions list:
Expand the “3D View” section.
Then expand the “3D View Global” section.
Look for “Set 3D Cursor” option.
Just untick this option and save your preferences.
If you click now accidentally somewhere in the 3d viewport the 3d cursor won’t be move anymore.
Set 3D Cursor Back to Zero (Addon)
Too all who don’t like the “Lock 3d cursor” method you can use a small addon I wrote in the past.
For some reasons the plugin does NOT work properly with Blender 2.93.* (Steam & Non-Steam version) but it works on all other versions beginning from 2.8 to 3.0 alpha.
This addon allows you to set the 3d cursor back to zero with hotkeys.
Download and install the addon.
If you like you are able to change the hotkeys of the addon (default is SHIFT+V).
In “Keymap” section search for “set cursor to zero” and change the keys as you like.
If you want the 3D cursor to be set back to zero hold Shift and press V (or use the keys you have set).