to the forum!
I would like to invite
@mcvansoest to the conversation.
Just a quick note about light and cacti ... I don't know if this is a plant you've had for a while or if it's relatively new, but full strength outdoor sun is very different from indoor sun, or whatever relatively protected (eg. greenhouse) situation the plant was in before the point of sale. It can be sort of dangerous to move plants right into midday sun from a more protected situation, whatever the case may be.
So generally I try to discourage people from treating indoor sun and outdoor sun as equivalent for their cacti (which they are not), and I try to discourage giving maximum exposure to newly acquired plants (that they are not used to). A position right inside the brightest window of the house would be ideal here, with a newly acquired (or otherwise indoor) plant.
The difference between indoor sun and outdoor sun mostly has to do with the way that regular window glass cuts out a lot of the UV part of the spectrum but allows the visible light to pass through. The UV in direct (outdoor) sun is what tends to threaten plants that haven't had some time and experience to get used to it.
Given what you have observed, find a nice bright but protected place for your cactus to recover. Avoid direct (outdoor) midday sun. Provide as much natural light as possible if this is an indoor situation. The more, the better indoors. If it's an outside plant, maybe filtered light or morning sun would be good for the near future. Go for the brightest location possible that doesn't include direct midday sun.
I can't say if what you observed has to do with sun, just trying to explain why that possibly that could be a factor.