Lightly grease a small, air fryer-safe baking pan, mug, or ramekin with a bit of butter or non-stick cooking spray.
In a microwave-safe bowl or a small saucepan and melt the butter. Once melted, add sugar, unsweetened cocoa powder, vanilla extract, and a pinch of salt. Mix well.
Once the mixture is well combined and slightly cooled, stir in the egg yolk. Make sure the mixture isn't too hot to avoid cooking the yolk.
Add the flour to the mixture and stir until combined. Be careful not to overmix, as it could make the brownie dry.
If you use chocolate chips or chopped chocolate, fold them in now.
Pour the brownie batter into your prepared pan or ramekin.
Set the air fryer to 350°F (175°C) and cook the brownie for about 10-12 minutes. The exact time might depend on your specific air fryer model, so start checking at around 8 minutes to avoid overcooking. The brownie is done when the top is set, but the center is still slightly gooey.
Allow the brownie to cool for a few minutes before enjoying it right from the pan. Be careful as it will be hot!