Was messing around with an object i was working on and had moved the object highlighted in the picture out of its space by accident, I then saved and quit by accident and now have no idea how to place it back in perfectly. I do not have any autosaves from before this big mistake.
Here is a technique that will work if you have moved the object but not rotated it:
Your object appears to be made of stacked cubes. I've made one consisting of two cubes. Let's assume you want one of the cubes, probably the larger one to fit in the hole so that the top face is flush:
- Set an origin for the object that helps position it.
- Place the 3D cursor in the hole to help position the object
- Move the object using the snapping menu
The key to these steps is moving the 3D cursor to the selection and vice versa. This is done by typing Shift–S to bring up this pie menu and the 8 to select Cursor to Selected or 2 to select Selected to Cursor
If you can't get an exact match, and the object does not have rotation applied, you can also use the local coordinates when moving. (Shortcut G followed by repeating the axis you want to move twice, ie GZZ to move on the local axis.) You can accomplish similar by changing the Transformation Orientation:
And, of course, in the final analysis you can use Vertex snapping as suggested by Jachym Michal in a comment on your question.