Preheat oven to 350°F and spray muffin pan (or similar baking pan) with baking spray.
In the bowl of a stand mixer, beat butter and cream cheese until combined. Add sugar and mix until combined and fluffy. Add vanilla extract and eggs; mix well.
Add flour, cocoa powder, and salt; mix until fully incorporated.
Use a cookie scoop to fill each cavity about three quarters full. If using a regular muffin/cupcake pan (or heart-shaped cupcake pan), bake for about 25 minutes. If using a Wilton Mini Heart Cakes Pan, bake 15 to 18 minutes. Test doneness by inserting a toothpick or cake tester into the center each cake; if it comes out clean, they’re done!
Let cakes cool in pan for 5 to 10 minutes, then transfer to a wire rack to cool completely. Repeat with remaining batter, making sure to wipe out and re-spray pan as needed.