I have an object with a 12 V decorative lamp that I want to install in my garden. I wanted to place a transformer near the 110 V line and pull a wire up to the lamp, but I was advised to put the transformer near the lamp and pull the 110 V wire to it. Is that correct?

Yes, because if you transmit low voltage across the wires, the losses will be greater and the lamp may not turn on at the brightness you want. It is best to transmit the 110 V or even 220 V from the mains to the transformer primary and connect it through a short wire to the lamp, so the losses will be greater. This is important if the distance to the lamp is more than 10 meters and its consumption is greater than 500 mA. The idea of always transmitting energy at higher voltages is valid for any other application. For example, on farms or farms it is always better to power a 220 V distant water pump motor than 110 V, because at 110 V the wire losses will be greater.