Place the bacon in a cold 12-inch skillet over medium heat and cook for 8 to 10 minutes, turning occasionally, until deep golden and crisp. Transfer to a paper towel-lined plate, cool, then crumble into small pieces (about 1 cup; set aside ¼ cup for topping).
Position an oven rack in the center of the oven and preheat to 325°F (165°C). Spray a 9x13-inch baking dish generously with nonstick cooking spray, including the corners, and check the oven thermometer once ready, adjusting the dial if it reads off.
Peel the potatoes with a vegetable peeler, trim away any green spots or eyes, and cut into ¾-inch (2 cm) cubes. Measure out 6 cups; if holding the cubes, keep them in cold water, then drain and pat completely dry before mixing.
Finely dice the yellow onion to make ½ cup (80 g), mince or press the garlic to make about 3 teaspoons, shred the cheddar on the large holes of a box grater to make 2 cups (8 ounces or 225 g), and slice the green onions for garnish.
In a large bowl, stir together the mayonnaise, minced garlic, salt, and black pepper until smooth. Add the shredded cheddar, diced onion, and ¾ cup of the crumbled bacon, stirring until evenly distributed.
Add the dry potato cubes to the bowl and fold until every cube is coated in the creamy mixture, scraping the bottom of the bowl as you go. The mixture will look thick and heavy, which is correct.
Scoop the mixture into the prepared baking dish, spread into an even layer, and gently press down with the back of the spatula. Make sure the corners are filled so those potatoes do not dry out.
Bake uncovered on the center rack for 1 hour 30 minutes, stirring gently at the 45-minute mark to bring the edges toward the center. If the top browns faster than the potatoes soften, tent loosely with foil; at 80 minutes, test a center cube — it is done when a fork slides in with no resistance and the top and edges are browned.
Remove from the oven and rest for 5 minutes so the sauce thickens slightly. Sprinkle the remaining ¼ cup bacon and the sliced green onions over the top, then scoop and serve hot, making sure each portion includes some of the browned edge.