Heat the oven to 350° and spray a casserole dish with cooking spray.
Melt a tablespoon of butter in a pan and cook the onions for 4 minutes.
Melt a tablespoon of butter and stir into the cornflakes till well combined.
Combine the velveeta cheese, cream of chicken soup, remaining butter, garlic powder, and paprika in a bowl. Melt in a microwave for 3 minutes, stirring every minute.
Stir the onions into the cheese sauce.
Place the hash browns in the casserole dish and pour the cheese sauce over the potatoes, stirring to combine. Spread the shredded cheese over the potatoes.
Spread the cornflakes evenly over the cheese.
Place in the oven and bake for 45 minutes until bubbly and the topping is browned lightly.