You have a part mounted on your thing at position A, and you need it to be in position B, using the original screw holes at A. This is what you need. This will create an adaptor or jig that mounts to the part's original location and provides the same screw holes for the new location.
The example STL and pictures provided are to relocate the filament sensor on a Creality CR6SE when the stock extruder has been replaced with a BMG Dual-gear extruder.
It repositions the sensor so the output is properly located, and additionally set back in the X direction to get better access to the filament between the two. The given holes in the “offset plate” are right-sized for M3 screws to self-tap. “Access holes” allow access to the original screw locations.
The SCAD file is extensibly customizable for other uses, with the following restrictions.
I hope this is useful to folk!
The author marked this model as their own original creation.