If your hair is severely damaged unfortunately nothing can bring that back to health, hair is dead so cannot permanently be repaired. Sometimes curl is temporarily lost due to dehydration but it can be permanently lost due to damage to the protein structure of the hair, so you may need to lose some length.

For hair closer to the roots that is less damaged try a combination of hydrolysed protein treatments, coconut oil and honey soaks (clean dry hair may absorb better), making sure every product in your routine is hydrating your hair, go 'strict' Curly Girl instead of shampooing, stop all heat styling.

What is your routine at present? Have you considered a hair analysis like Komaza Care to see how far up the hair the severe damage is? They can tell you exactly how much needs to be trimmed away.
Komaza Care HAIR ANALYSIS Service - Rave! - Long Hair Care Forum
2a-2c, medium texture, porous/ colour treated. Three years CG. Past bra strap length heading for waist.

CO-wash: Inecto coconut/ Elvive Volume Collagen
Treatments: Komaza Care Matani, coconut/ sweet almond/ fractionated coconut oils, Hairveda Sitrinillah
Leave in: Fructis Sleek & Shine (old), Gliss Ultimate Volume, various Elvive
Styler: Umberto Giannini jelly, Au Naturale styling gelee
Flour sack towel, pixie diffuse or air dry.
Experimenting with: benign neglect