Yes — the Prophet ﷺ taught that a strong believer is better and more beloved to Allah than a weak believer, while affirming that good is found in both, meaning physical strength is valued without dismissing anyone's worth. He personally raced his wife Aisha more than once, encouraged parents to teach their children swimming, archery, and horseback riding, and treated the body as something to be cared for rather than neglected. This fits the wider Islamic framework of the body as an amanah (a trust from Allah) that a person is answerable for, including how they look after their health and strength, not just how they use it for worship. Practically, this doesn't require a specific gym routine or sport — walking, regular movement, and simply avoiding a sedentary lifestyle all count. Exercise can also be framed as an act of gratitude for the physical ability Allah has given, and for those managing specific health conditions, a doctor can help tailor safe, effective activity levels.
Q&A · Health & Halal Food
Is physical fitness and exercise encouraged in Islam?
References
Sahih Muslim 2664
Informational, not a personal fatwa. Consult a qualified scholar for rulings on your situation.