I believe this claim is true or false to a certain extent.
According to an article from Healthline, "According to many experts, losing 1–2 pounds (0.45–0.9 kg) per week is a healthy and safe rate (1, 2, 3 ). Losing more than that is considered too fast and could put you at risk of many health problems, including muscle loss, gallstones, nutritional deficiencies and a drop in metabolism ( 4 , 6 , 7 , 8 )." Implying that losing weight in general, is not necessarily bad for your health, but depending on how fast it took you to lose weight plays a role in getting health problems and earlier death.
HealthLine
According to the CDC, "Even a modest weight loss of 5% to 10% of your total body weight is likely to produce health benefits, such as improvements in blood pressure, blood cholesterol, and blood sugars."
CDC
An article from WebMD lists symptoms of rapid weight loss, which could lead to more serious health problems, "Possible serious risks include: Gallstones, which occur in 12% to 25% of people losing large amounts of weight over several months, Dehydration, which can be avoided by drinking plenty of fluids, Malnutrition, usually from not eating enough protein for weeks at a time, Electrolyte imbalances, which rarely can be life threatening. Other side effects of rapid weight loss include: Headaches, Irritability, Fatigue, Dizziness, Constipation, Menstrual irregularities, Hair loss, Muscle loss." Making it apparent that most risks of losing weight resulting in more life-threatening health problems are heightened by how rapid the weight loss was.
WebMD
This claim is further corroborated by Cleveland Clinic and highlights the importance of gaining muscle mass as you lose weight, as rapid weight loss is associated with starving yourself of essential nutrients such as protein which is needed to create muscle mass. The article mentions the risks of not lifting weights and eating in an unhealthy way to lose weight rapidly, "Healthy weight loss isn’t just about what you eat. You need physical activity if you want maximum results. Cardiovascular exercise like walking burns calories, but strength training is just as important. When you lift weights or do resistance training, you increase muscle mass. And when you have more muscle mass, you: Burn more calories, even at rest. Improve your balance and reduce your risk of falls. Reduce joint pain and symptoms of arthritis so you can keep moving and losing weight. Strengthen your bones and reduce your risk of fractures and osteoporosis."
ClevelandClinic
Therefore, this claim is true or false to a certain extent because actually gaining weight at a normal pace, exercising, and eating well can lead to many benefits; however, losing weight in an unhealthy weight rapidly may lead to many bad health outcomes, leading to early death.