Preheat the oven to 375 degrees F.
Cook the green beans in the microwave or boil them on the stovetop according to package directions.
In a large skillet, melt butter over medium heat.
Add the diced onions and cook until softened, about 5-7 minutes.
Add the minced garlic and cook another minute.
Add the cream cheese, cream of mushroom soup, and milk to the skillet. Use a wooden spoon to break the cream cheese into smaller pieces and incorporate into the rest of the ingredients. I like to put a lid on it for a couple of minutes to encourage the cream cheese to warm up and create the sauce.
Season with salt and pepper.
Add the green beans and stir to combine.
Transfer to a 9x13" baking dish.
Bake in the preheated oven for 30 minutes.
Remove from the oven and then evenly top with fried onions.
Bake for another 5-10 minutes, until the fried onions are golden brown.
Serve and enjoy!