AC-DC converter (230V - 5V) supply for microcontroller to control outlet
I have tried using transistors by puting two in parallel of each other and controlling them with the microcontroller but didn't get them to turn on.


You are lucky that you and your equipment survived that. It was a very dangerous and foolish experiment because you had violated the insulation between your micro-controller and the mains.

You must use an isolation device properly rated for your voltage and current of your load. Typically for 230 V supply you look for isolation > 1000 V. Apply some safety margin to your current as well.



Solid-state relays are available in small packages. You must ensure adequate safety distance between the control and output terminals.