In a mixing bowl, combine the ground beef, garlic powder, onion powder, salt, and black pepper. Mix until just combined; avoid overmixing to keep the burgers tender.
Divide the mixture into four equal portions and shape them into patties, pressing a small indentation in the center of each to prevent puffing up while cooking.
Preheat your air fryer to 375°F (190°C) for about 5 minutes.
Lightly spray the air fryer basket with cooking spray to prevent sticking.
Place the burger patties in the air fryer basket in a single layer, making sure they are spaced apart for even cooking.
Cook the burgers for 10 minutes, flipping them halfway through for even cooking. If using cheese, add a slice on top of each burger for the last 2 minutes of cooking.
Check the internal temperature of the burgers with a meat thermometer; they should read 160°F (71°C) for medium.
Once done, remove the burgers from the air fryer and let them rest for a couple of minutes.
Serve each burger on a bun with your favorite toppings such as lettuce, tomato, and pickles.