Heat sugar in a pan until it melts and turns into golden caramel.
Pour the caramel into a baking mold and spread evenly.
In a bowl, whisk eggs gently (avoid too many bubbles).
Add coconut milk, palm sugar, and vanilla extract, and mix well.
Strain the mixture for a smooth texture.
Pour over the caramel layer in the mold.
Bake in a water bath (bain-marie) at 160°C for 40–50 minutes.
Let it cool completely, then refrigerate for a few hours.
Invert onto a plate before serving.