Preheat your oven to 350°F. In a bowl, combine the almond flour, cocoa powder, powdered erythritol, and salt. Stir in the melted butter and egg yolk until a dough forms.
Press the dough evenly into the bottom and up the sides of a 9-inch tart pan with a removable bottom. Use the back of a measuring cup to get it smooth and even.
Bake for 12 to 14 minutes until the crust feels firm and dry to the touch. Let it cool completely in the pan. Place the finely chopped sugar-free dark chocolate in a heatproof bowl. Heat the heavy cream in a small saucepan over medium heat until it just begins to simmer around the edges.
Pour the hot cream over the chocolate and let it sit undisturbed for 2 minutes. Then stir slowly from the center outward in small circles until the ganache is completely smooth and glossy. Stir in the butter and vanilla extract until melted and incorporated.
Pour the warm ganache into the cooled tart shell and gently tilt the pan to spread it evenly. Tap the pan on the counter a few times to smooth the surface and remove any air bubbles.
Refrigerate the tart for at least 3 hours until the ganache is set and firm. It should be smooth and silky when you touch the surface.
Before serving, remove the tart from the pan, sprinkle with flaky sea salt, and arrange fresh raspberries on top. Let it sit at room temperature for 10 minutes before slicing for the cleanest cuts.