Preheat the air fryer to 400°F.
In a large bowl, combine the cauliflower florets with olive oil, garlic powder, onion powder, smoked paprika, salt, black pepper, and cayenne pepper if using. Toss until the cauliflower is evenly coated.
Place the seasoned cauliflower florets in the air fryer basket in a single layer.
Cook for 10-12 minutes, shaking the basket halfway through to ensure even cooking.
If using Parmesan cheese, sprinkle it over the cauliflower during the last 2 minutes of cooking.
Once the cauliflower is golden brown and crispy, remove it from the air fryer and let it cool for a couple of minutes before serving.