Finely dice the onion and mince the garlic.
Preheat your air fryer to 400°F for 3 minutes with a baking pan placed inside.
Carefully add olive oil to the preheated baking pan, then add the diced onion and garlic.
Stir with a wooden spoon to coat the onion and garlic, then close the air fryer and cook for 3 minutes.
Open the basket, stir the mixture, and add the butter. Close again to let the butter melt fully.
Quarter the mushrooms and add them to the baking pan. Stir to coat them in the butter and onion-garlic mixture.
Close the air fryer and cook for 5 minutes.
Add the risotto rice to the baking pan and stir to coat with the mixture. Cook for about 1 minute.
Pour in 1/3 of the warm chicken or vegetable broth. Close the basket and cook for 5 minutes.
Add the remaining broth, lower the air fryer temperature to 350°F, and cook for 20 minutes, stirring once halfway through.
After cooking, leave the basket closed for 5 minutes. Then fluff the risotto, garnish with parsley, and serve.