
Certified GKH Gardening Expert
Was the grayish part below the soil line? If not, you may want to carefully remove the cactus all the way and examine the roots. If they are black or brown they are rotting. Will you be reimbursed if you return this plant to the store? If the roots are questionable I would take it back. If you can't, try snipping off the dead roots and repotting it in cactus soil with perlite added to improve drainage.
https://www.gardeningknowhow.com/ornamental/cacti-succulents/scgen/stem-rot-of-cactus.htm