Gently warm your milk in a medium saucepan over medium heat until it just starts to simmer around the edges. Take it off the heat immediately.
If you're including egg yolks, let the milk cool down a bit until it's lukewarm. Whisk the egg yolks into the milk mixture until everything is smoothly combined.
Place the pan back on medium-high heat. Keep stirring continuously for about 6 minutes, bringing the mixture to a gentle boil without letting it scorch.
To avoid lumps, whisk the xanthan gum with a tiny splash of cold milk in a small bowl to create a smooth slurry. Stir this into your warm milk mixture and continue cooking for another 4 minutes, stirring well.
Remove the pan from the heat and stir in the heavy cream.
Once the mixture has completely cooled to room temperature, stir in your sugar substitute, vanilla extract, and the cocoa powder if you're making chocolate ice cream.
For the best creamy texture, cover the mixture and chill it thoroughly in the refrigerator, ideally overnight. This step is crucial!
Pour the well-chilled mixture into your ice cream maker and churn according to the manufacturer's directions until it reaches a soft-serve consistency.
Serve immediately for a delightful soft-serve experience, or transfer to an airtight container and freeze for a firmer, scoopable ice cream. Store any leftovers in the freezer.