There are any number of possibilities, but the most likely ones all involve getting better equipment. The most severe sync problems with phones tend to come from phones that use variable framerate video or tend to have cheap encoders that tend to drop or delay frames.
When you are recording video, each frame has to be recorded more or less in real time. There is a slight buffer available to store frames while they are processed, but if images are not processed at the rate they are shot, then eventually that buffer fills. If a phone can't keep up, it has two options, either drop a frame outright and skip to the next one or use a file format that lets it alter the frame rate on the fly and record fewer frames per second when it has trouble.
Both of these approaches often destroy any kind of audio sync. The variable frame rate, if well implemented, should limit drift a bit more since the frames should still advance at a fairly consistent rate of time, but they may get delayed and become out of sync. Dropped frames are generally far worse. Since nothing exists for that frame, the next frame is simply used and a slice of time is lost in the video that isn't lost in a separate audio stream that didn't have the dropped frame.
Both of these problems are unfortunately hardware dependent and there is no way to fix them on the hardware you have. (You could try to reduce resolution to make the job easier for the encoder I suppose.) If one of these is the source of the issue, getting another camera with a better encoder is the only other option you really have available if you want to maintain the resolution you are using.
Another possible problem that is less common today, is that the internal timecode clock may simply be fast or slow. For the most part frame timing is pretty consistent with modern technology, but if there is a problem, you can try syncing at the beginning and end of the video and adjust the audio speed accordingly. Check a few times throughout the middle when you do this, because most modern problems will probably not be this simple and the middle will still be out of sync.
An even better solution is to use a camera that can accept an external audio input. By syncing the audio to the video in real time while recording on the same device, you can ensure proper timing is maintained by the encoder. It's still probably a good idea to do an external recording as well, since this will help detect if there were capture problems, but using an external audio input is far simpler than dealing with sync issues after the fact.