Q.Dying Cactus Revival
A couple days ago I noticed my small indoor cactus was slightly tilted and it’s root visible from the back.
Today I realised it was considerably wilted, much smaller than its original size and yellow.
Is it too late to save it? I have watered it and put it out in direct sun today.

Certified GKH Gardening Expert
That appears to be past saving, unfortunately. This can happen for many reasons. Unfortunately, these reasons can also be contradictory.
Over and underwatering can cause this, as well as too much or too little light.
I can't see the soil under the rocks, but sometimes incorrect soil that contains too much nutrients or too little drainage capability can be to blame.
What I can do is provide some articles on cacti care to help you with the next one:
https://www.gardeningknowhow.com/category/ornamental/cacti-succulents/scgen