Welcome to the XA forum. Feel free to post!
There is a tiny little pin that rests in a spring loaded recess below the cover at the top of the camera.
When your cover snapped off, that pin was lost.
I have an XA with the pin missing and I have to hold the cover open by hand to work the camera.
I think if I find a stainless nail or brad of the correct thickness (thin-ness?) that I can cut off a piece and make it work as a replacement.