Transformer for pcb

I assume you are looking for a "DC power supply" (which is a transformer plus additional components).

A "transformer" has AC input and AC output. A switchmode power supply can use a smaller transformer (for the same current) because it operates at much higher frequency than a transformer running directly from the 50/60Hz power line.

So, you might find a power supply that's smaller than a transformer but the additional components add to the overall size.