220V AC to 12V DC transformerless and main isolated converter?
What you are trying to do is VERY DANGEROUS, mainly because you do not know enough to know what the risks are.

Good, safe, reliable, certified safe power supplies are cheap and plentiful and available in "wall wart" and "power brick" styles very cheaply requiring only a DC jack on your device. If it is just a home project you can probably find an old power supply around the house you can use.

If you MUST build a mains power supply into your device there are MANY things you must know &amp; take account of in the design &amp; layout &amp; manufacture of the device. But these cannot be relevant because you would be INSANE to produce &amp; sell such a thing without knowing a LOT more than you do now &amp; having a professional certify the electrical safety before you were able to sell it to anyone without a high risk of someone being injured or killed - and if you are in a country where such a thing is likely, you will also be sued for damages by the injured party &amp; probably taken to court by the authorities for selling an unsafe product.