Recommended · for some experience
Teardown of a G9 LED lamp.
Why people recommend it
Big Clive's teardown of a G9 LED lamp, cited to explain how mains LED lamps are built, including the capacitor and rectifier circuit inside.
Watch for: Mains voltage circuitry, so take care if copying it
In their words
See the answers below but in addition to that you might want to watch some of BigClive's videos on Youtube, for example:
Bimpelrekkie on electronics.stackexchange.com, Mar 2021. CC BY-SA.
Screengrab from Big Clive's Teardown of a G9 LED lamp.
Transistor on electronics.stackexchange.com, Jan 2020. CC BY-SA.