Buy genuine OEM Glock lower and upper parts kits.
I think knock-off parts kits are behind the problems many people have. I recently purchased a non-OEM kit accidentally and there were issues with the striker (oversized), striker safety plunger (oversized), trigger bar (flimsy), and connector (didn’t). When swapped out for genuine Glock parts everything worked great.
Another big mistake people make is assembling the entire pistol before tuning slide/rail fit. I recommend installing the rails and then working on them as needed until your stripped slide cycles smoothly. Only then finish assembling. I had one that had beautifully smooth cycling with no rail work and another that required a lot of filing, sanding, and polishing of the rails. This was due 100% to differences in the rail dimensions between the two kits, not the slides.
If your rails bind in the slide mark them with Sharpie marker, cycle the slide, then look for where the Sharpie was scraped off to know where to remove material.