Simple voltage/wattage/resistor question about night light
A few things:

What you have there is a pigtail neon. They're not like regular filament bulbs. You've probably seen these as power indicators in old / cheap multiway power-strips.

You don't necessarily want to increase the power output too much with your own replacement, because that additional heat is trapped inside a sealed plastic enclosure.

A 12V lamp will be immediately cooked if you try to power it directly off mains. Your intuition is correct. 10W is also an enormous amount of heat to produce in a sealed enclosure.

The topology of circuit you may be interested in can be found here. The capacitor acts like a resistor to drop voltage, but relies on reactance instead of resistance to do this ( no / minimal heat generated )

That'll mean the power rating of your LED will be the only heat produced in your circuit, more-or-less.