Preheat the air fryer to 350°F (175°C) for about 5 minutes.
In a mixing bowl, combine the ground beef with garlic powder, onion powder, salt, and black pepper. Mix gently until just combined to avoid tough burgers.
Divide the mixture into 4 equal parts and shape each part into a patty about ¾ inch thick, making a small indentation in the center of each patty to prevent puffing during cooking.
Place the patties in the preheated air fryer basket, making sure they don’t touch. Cook in batches if necessary.
Cook the burgers in the air fryer for about 10-12 minutes, flipping halfway through. Use a meat thermometer to check for doneness; the internal temperature should reach at least 160°F (71°C) for medium.
If adding cheese, place a slice on each patty in the last minute of cooking to allow it to melt.
Remove the burgers from the air fryer and let them rest for a couple of minutes.
Assemble the burgers with the hamburger buns, adding lettuce, tomato, onions, and condiments to taste.