AC to DC signal to drive a MOSFET
Without proper galvanic isolation your led is considered to be on the hazardous voltage side of your product by IEC and UL norms.

You may use a simple AC/DC capacitive power supply if you encapsulate your product in a UL 5V-B plastic enclosure.
The led though must stay inside the enclosure.
You should use a 5V-B plastic light pipe to see the light through the enclosure.
See this TDK tutorial titled &quot;Everything for Capacitive Power Supplies&quot;
https://www.tdk-electronics.tdk.com/en/373562/tech-library/articles/applications-cases/applications-cases/everything-for-capacitive-power-supplies-from-a-single-source/1380514

TDK says:
Designs based on capacitive topologies are particularly suitable for power supplies in the milliwatt range. They are simple, compact and economical.