Mounting 24v transformer?
in mains electrical, wiring methods are everything.  You're running smack into that right now.
What you were thinking of is this.

However for thermostat wiring, the above is a silly product, because generally speaking thermostat wiring is a permanent part of the building, and there'd be no reason to make it pluggable, and a lot of reason not to.   Enter products like yours, which are designed to mount on standard 120/240V steel junction boxes, common as dirt in 120V wiring methods:

They're so common Amazon doesn't practically sell them, since every hardware store and electrical supply stocks them for about a dollar.   As you can see, your transformer is made to be the lid of this.
However, you have it upside down. Code requires it be mounted with the AC power (black and white) wires on the inside, where they will splice to AC power wires also inside. The non-hazardous low voltage terminals are to be on the outside of the box.
Now, if your basement is unfinished, there's likely to be one of these junction boxes somewhere, with handy circuits behind it your electrician can tap.  Alternately, she can fit one of these boxes at an appropriate location, and then use listed wiring methods compliant with the Electrical Code to bring 120V mains power to the box.
At that point, the electrician splices the transformer's 2 wires to mains power hardwired, fits the transformer as the box lid, tightens it down, and leaves. You use thermostat cable to take the 24V wherever you need to go.  (or the electrician also could, obviously, and they're experienced at fishing wires through finished walls without wrecking drywall).
The key to this type is you let the thermostat wire do the traveling, you fit the transformer in a less finished utility space, crawlspace or basement where that makes sense.   I would say that is also true of the wall-wart transformer you really want.
But you don't really want a wall-wart transformer, you want this thing, hardwired in and installed to code.  Call an electrician, or learn proper wiring methods and fit your own box.  DO NOT hork this thing together like you have been aiming to do so far.