The spine has four natural curves. I will address two of them here.
The best way to relax the spine and start working on restoring its natural curves is to go on hands and knees.
Your wrists are directly below your shoulders, hips directly below knees.
Let your head hang.
Let your spine uncurl with the help of gravity.
Release all tension from your abdomen and chest.
Let your belly relax fully.
Pause after each exhale and feel your spine relax more with each breath.
Your arms stay straight and supportive.
You should eventually see the return of your natural curve in the lower back (lumbar curve)
To start recovering the natural curvature of your thoracic spine, align your ribcage so it lines up with your pelvis. Bring your bottom ribs towards your spine WITHOUT your pelvis moving.
In the picture above, my ribcage is dropped. In the photo below, my bottom ribs are tucked in.
And finally, this is how NOT to do it, unless this is the shape you want to create.
Look at yourself in the mirror. Is this how you want to look? The choice is yours!