It’s really only unhealthy if you’re eating that every time you eat. And mostly what makes it unhealthy is the fat/lean ratio. Hamburgers usually use fattier hamburger. You can make them with leaner meat tho. They just don’t taste nearly as good.
Ratios and amount are the most important thing in healthy eating. For reference, vegetables should be more than half your food intake, the rest split between whole-grain carbs and protein (either meat or plant based) in order to be healthy. And we need to pay attention to how much total food we eat too since our monkey brains that evolved under extreme food scarcity don’t do a good job of moderating nutrient input.
White bread, cheese (at least not the one on burgers) and red meat aren’t exactly known as healthy foods. Definitely not in the proportions of a burger. Even more definitely not when you boil the meat in oil (often together with the onions).