This is a safety enclosure for a Solid State Relay. It mounts centered on a 2040, but absolutely could be mounted on a 2020 extrusion.
Having an uncovered relay is a potential hazard, especially if being used for AC mains.
The venting is designed for a vertical mounting, however if you are not overloading the relay you shouldn't have issues mounting this in any orientation.
My print was printed with a 1mm nozzle, .45 layer height. your print may come out nicer.
Use M4x16 screws to mount the relay to the frame with T-nuts, sandwiching the enclosure between the relay and the rail. The cover is held on with 2 M3x15ish screws.
You can use zip ties to secure the wires through the loops for additional stress relief.
You may need to scale the STL files up from INCH to METRIC if your slicer does not automatically do it.