How to mount a 12V transformer for indoor lighting
It's not approved for use in AC wiring
See the backslanted RU?  That means the power supply is only RU-Recognized as a component of some future product that will then be UL-Listed.
You are not allowed to install RU-Recognized things in house wiring.  You can only install UL-Listed things.
An RU-Recognized thing can be converted to a UL-Listed thing by packaging it in an enclosure that conforms to the UL White Book and sending it off to UL for approval along with labeling and instructions. One challenge you would need to resolve is how to put the mains wires inside the box and the low-voltage wires outside the box.  Note most UL-listed 24V thermostat transformers do exactly that, mounting in a knockout or as a junction box lid, and providing terminals on the correct side.
As you grind through the UL Listing process, UL will notice that your active component is RU-Recognized, and they will not tear it down and do their usual testing suite, since they already have. That is the value/purpose of RU.
Typically this module would be part of a luminaire (light fixture) and the luminaire would be UL Listed in  the usual way.
Other than that, you can go to the final arbiter of approval: your local electrical inspector, and ask them if they will approve some sort of mounting method.