How old is the drone? If still under warranty are you concerned about invalidating that warranty? If so then it is likely that DIY repairs are out.
I asked about the photo of the broken state because I would be surprised if, taken literally, "The camera popped out of the gimble" was possible.
With the
Mavic 2 Pro the actual camera housing is screwed to bearings etc. which have to be dismantled to allow the camera housing to be removed form the gimbal and the camera housing is held together with screws. So nothing there can be "popped out" without breaking something. I would be surprised in the
MA2's gimbal and camera differs greatly in assembly design but I can find no videos where the actual gimbal and camera assembly are dismantled.
Also, if "popped out" was caused by a bearing coming out of its housing I would be concerned about two things
1) whether or not accurate alignment is a MUST. Something provides the gimbal parts with a means of sensing their positions .Whatever does this might be dependant of things having an accurately positioned datumn. Looking at the 'unremovable' bearings of the
Mavic 2 gimbal there appears to be a pin and slot which are mated and at a guess serve to provide alignment for something. I am sure you can see where this line of thought is going.
2) A bearing that has already come out of its housing may be loose and do so again.
So, I think you need to provide a less generalised description than "popped out".
The above said if the camera can literally pop out etc. and the gimbal 'just needs' 'resetting' you might want to do a search using "gimbal", "calibration", and "python" as parameters and read up on the results and warnings.
Bear in mind I have no idea if such calibration has any affect on warranty.
The only thing that I can think of that might match "popping out" is any damper rubbers coming off or out of their mountings but those generally require careful refitting over lugs or through holes