In short, the highest quality is stored on board the Mavic, and anything you find on your phone is just an advance copy or draft quality version.
All of the recording done "on board" the Mavic (onto the microSD card inside the Mavic itself) is controlled through the app on your phone/tablet or the controller buttons itself. It is super easy to forget to start recording, and I don't like the DJI Go 4 app's record button appearance, as it is easy to mistake "hey, you can tap this to start recording" for "hey, the Mavic is currently recording". Also, if you tap the "take a picture" button on the controller, you need to remember to start recording video again on your own. It is not automatic.
There is a separate copy of the video feed that is cached onto your phone/tablet while you fly, up to a specified cache size limit. This is really only useful for instant replay or drone-search-and-rescue missions; the quality is far less than the on board recording. If you forgot to start the on board recording, though, this is your cleanest copy of the video received during flight. None of the still images that you took with the "take a picture" button will be sent down to your phone/tablet; you will have to load the microSD card to your computer or other microSD-capable device after the flight to grab those.
Lastly, some people run a separate app on their phone/tablet which can capture the appearance of the phone/tablet screen, including all the heads-up display statistics showing the distance and direction and reception quality. If you run this kind of tool at the same time as your Mavic controlling app, you are trying to record two whole video streams at the same time, so be sure you have a very fast memory card on your phone/tablet device. Glitches could appear in either of these recordings in this case, but should not affect any of the on board recordings... assuming you remembered to start the on board recordings.