Stretch the strings in very well, make sure the bridge pins are well seated and the strings are wound on the tuners right. The tuners are rarely the culprit with detuning issues. If all else fails have the nut slots opened up a bit.
If stock strings, change them out and also stretch them out (there is a wrong and right way so . . . ) or give adequate break in time + make sure the strings are wound properly esp the non wound ones . . . .Check to make sure the nut is sotted correctly, the saddle doesn't have cuts on it, the bridge pins are seated correctly and string balls are seated in the bridge pins, and bridge is stable corners aren't lifting (if you can slide a post it in between bridge and soundboard . . . ) .
The string balls should lock under the slots of the bridge plate inside the guitar. The pins aren’t really what is supposed to lock the string in place. The pins just keep the strings from sliding back out of the bridge pin slots.
You have to bend the string into a hook slightly in front of the ball to do so. You can feel and often hear the string and ball slide into place. Better connection between the ball end and the top and keeps from chewing up the bridge plate.