Heat oven to 180C/160C fan/gas 4. Line 4 x 20cm cake tins with baking parchment (or use 2 and make the carrot sponges first, then the courgette layers).
Start by making the carrot layers. Put the sugar, eggs and oil in a large mixing bowl. Using an electric whisk, beat until incorporated. Sieve the flour and all the dry ingredients into the same bowl, then gently fold in before adding the carrot, a pinch of salt and vanilla extract. Stir to combine.
Divide the carrot cake mixture between 2 of the prepared cake tins and bake for 20-25 mins or until golden brown and firm to the touch. Leave the cakes to cool in the tins for a few mins, then turn out onto wire racks when cool enough to handle.
Meanwhile, make the courgette layers. Put the sugar, eggs and oil in a large bowl and use a hand whisk to combine. Sieve in the dry ingredients and fold in, then add the courgettes and mix together.
Pour the courgette cake mixture into the remaining 2 cake tins and bake for 20-25 mins or until golden brown. Leave to cool in the tins, then turn out onto wire racks to cool fully.
To make the frosting, tip the butter into a large bowl and beat with an electric hand whisk until smooth. Add the cream cheese and beat again. Sieve in the icing sugar and beat until combined.
Layer up the cakes alternately, spreading a little frosting between each layer as you go. Cover the whole cake with the rest of the frosting and serve. Will keep for 2 days in an airtight container.