KRA opens only in Krita, and the layers are meaningless elsewhere. JPG opens on every device and is accepted by practically every upload form. KRA is at home in digital painting that is still being edited; JPG is the usual choice for photos you need to share, upload or print. JPG is lossy, so keep the KRA original if you may need full quality later.
JPG has no transparency, so see-through areas of a KRA are filled with a solid colour, white by default; you can change it under Options. The defaults suit most files. Under Options you can set the quality, aim for a target file size and resize the result.
The picture is the flattened image that Krita stored in the file, so the layers are not kept and cannot be edited afterwards.