In a large mixing bowl, combine the ground beef, garlic powder, onion powder, salt, and black pepper. Mix gently until the ingredients are evenly incorporated, being careful not to overwork the meat.
Divide the mixture into 4 equal portions and shape each portion into a patty. Make a slight indentation in the center of each patty with your thumb to help them cook evenly.
Preheat the air fryer to 375°F (190°C) for about 5 minutes.
Once preheated, place the patties in the air fryer basket in a single layer. Cook for 10-12 minutes, flipping halfway through, until the internal temperature reaches 160°F (71°C) for medium doneness or to your liking.
If you want to add cheese, place a slice on each patty during the last 2 minutes of cooking and let it melt.
Remove the patties from the air fryer and let them rest for a few minutes. Toast the hamburger buns in the air fryer for 1-2 minutes if desired.
Assemble your hamburgers by placing each patty on a bun and adding your favorite toppings. Serve immediately.