The X-wing in canon is still one of those mysteries that have not been explained. We have not seen them at all in Rebels, yet the Rebel fleet in almost all later times has a majority of X-wings in their Starfighter corps verse everything else. There are few if any A-wings at Scarif. No B-wings (we know those are new). By Endor the Rebel fleet has some B-wings, as well as A-wing groups, some Y-wings, and still lots of X-wings. There are probably about as many X-wings as there are all the other types combined at Endor. There were certainly a lot more X-wings at both Scarif and Yavin than Y-wings.
The old EU stuff, especially the West End Games materials (that seems to be were the Story Group finds some of their roots for background materials) has the Rebel Alliance had more than a third of its relatively small budgets devoted to Starfighters (both acquiring and maintaining said forces). The Alliance had several worlds and or hidden dock that produced Starfighters for the Rebellion. Most are as well hidden as possible with as much of the materials possible produced locally so the Empire has nothing they can trace. The few pilots that test the new fighters are probably the only ones the Empire could catch to find said factories. Even the pilots that ferry the new fighters out are brought in blind. I would guess they leave blind as well, their astromechs programmed to wipe the previous coordinates then from wherever they jump to the pilots are allowed to navigate back to wherever their own bases or ships are located.
Because the Prime Directive is not a thing in Star Wars, it was speculated that they Alliance could use something like a pre-Atomic or early Atomic Era planet, help one faction over another and have the locals retool their propeller drive airplane plants with Starfighter production lines, with a large part of the production staying local in case the Empire does show up, and the rest going to the Rebel Alliance for distribution to various cells and the Fleet. Image companies like Lockheed, Boeing, Grumman, Mitsubishi, Fokker, Dornier, Messerschmitt and the like producing X-wings in the 1940s.
With the new canon, that means the Alliance would be building X-wings and B-wings for the most part with the Mon Calamari are refitting their "ships" into combat cruisers that can take on Star Destroyers. The remaining Y-wings are stolen from Imperial wrecking yards, mothballed Republic units, or old clone fighters that were sold off to planetary governments following the end of the war. The A-wings are likely purchased by sympathetic worlds and "donated" to the rebels much like Alderaan does. It is possible that the X-wings are another common planetary defense fighter that can be purchased and "donated", but we've yet to see them in Rebels (though one can guess Dodanna's group will have them) unless the Producers of Rebels or one of the other groups at Lucasfilm want to tell the story about where the Rebellion got all those X-wings we see later on.
The T-65 X-wing, at least from our perspective, has become the fighter of the Rebel Alliance, and its legacy continues up to TFA with the older T-70 X-wings the Resistance uses, and the reported T-85 X-wings the New Republic uses at that time.