Preheat the oven to 400°F.
Cook the macaroni according to package directions and drain.
Combine the condensed cheddar cheese soup and heavy cream in a large mixing bowl.
Add the garlic powder, onion powder, salt, and pepper.
Whisk the sauce mixture until well combined.
Stir in the cooked macaroni until coated.
Stir in the drained green beans.
Stir in 2 cups of the shredded cheese.
Transfer the mixture to a greased 9-by-13-inch baking dish and spread evenly.
Sprinkle the remaining shredded cheese over the top.
Sprinkle the crispy fried onions over the cheese.
Cover the dish with aluminum foil.
Bake for 20 minutes.
Remove the foil and bake 4 to 6 minutes more, until the onions are lightly browned.
Rest for a few minutes before scooping and serving.
Serve warm.