My oven does not work at the moment, but I have an air fryer.
Is it possible to bake a cake in the air fryer?
You can, absolutely. But it will be tricky.
The unique aspect of an air fryer is its high airflow, which dries out the surface of foods quite quickly. (In a residential kitchen, only a deep fryer comes close to matching that, hence "air fryer".) That's great for crispiness, but for baked goods, you have to consider how much "crispiness" you actually want.
If I had to cook a cake in the air fryer, I would find a recipe which was intended to be relatively flat and quick-cooking. If I just wanted to make a "baked" dessert in it, I'd make brownies instead. (Air fryers are great at brownies, because they're flat, quick-cooking, and benefit from a crispy top.)
Yes, you can bake a cake in an air fryer. In fact, an air fryer is an oven, the name is more of a marketing term.
It may bake slightly differently than in a typical large oven, watch out for it. If in doubt, try a lower temperature, and check diligently for doneness. It might not become perfect cake, but it should be enjoyable.