Rigging and skin modifier using rigify modifier
I guess the different mesh parts are from different objects?

First, make sure every object has its scale and rotation applied using &#9096; CtrlA → Apply Scale / Apply Rotation. Scale influences directly the rigs' deformation (basically as a multiplier), so if there are some differences in scales and rotation between the objects controlled by the same rig, it will be messy.

Then, the only thing you can do is work the weights so that the weights are basically the same where two different meshes hover each other or are close together. The goal is to make them move at the same rate, so if you set each close vertex with the same weight for the same bones, and if there's not a huge difference in mesh topology, it should work fine.

Alternatively, you can completely avoid the issue by simply joining these meshes together so there's not gap to manage in the first place.