Center cursor?

By accident I left-clicked and moved the 3D cursor from the position where I need it. I have an object where I want the cursor to be, if that helps. Any help is greatly appreciated.

Press shift-s, then in the menu choose cursor to selection. For an active object, this will put the cursor at the pink dot (which is the object’s centre). This dot can also be moved if necessary.

Or you can undo with “Ctrl + Z”

Press Shift + C to put the cursor back at the origin. (0,0,0)

Or place the cursor wherever you want, and then press C to center the 3-D view where the cursor is.

I use those keys a lot. I didn’t know about Shift+S.