Prepare the mascarpone mixture: In a medium bowl, whisk together the egg yolks and sugar until smooth and creamy. Place the mixture over a double boiler and whisk constantly for about 5-7 minutes until thickened. Remove from heat and let it cool slightly.
Add mascarpone: Once cooled, gently fold in the mascarpone cheese until fully combined and smooth.
Whip the cream: In a separate bowl, whip the heavy cream and vanilla extract until stiff peaks form. Carefully fold the whipped cream into the mascarpone mixture.
Prepare the espresso dip: In a shallow dish, mix the cooled espresso with the rum or coffee liqueur if using.
Assemble the tiramisu: Quickly dip each ladyfinger into the espresso mixture and place them in a single layer at the bottom of a 9x9-inch dish or a similarly sized serving dish.
Layer the cream: Spread half of the mascarpone mixture over the soaked ladyfingers. Repeat with another layer of dipped ladyfingers, followed by the remaining mascarpone mixture.
Chill and garnish: Cover and refrigerate for at least 4 hours or overnight to set. Before serving, dust the top with cocoa powder and garnish with dark chocolate shavings if desired.