If you just bought it, it may still be in soil that is not ideal for cactuses. What I do when I buy cactuses from big box stores is to remove them from the pot, remove as much of that dreaded peaty soil as I can to get them bare root, then trim the tips of the roots. I let it rest for a couple days in shade all naked like that, then repot with proper cactus soil amended with pumice. Then gradually introduce back to sunlight. Also don't water for at least a week if not longer.