Nobody warned Lockheed of the desire for lots of P-38s soon enough, so more/less hand-building them was still a Thing far longer than it should have been. (Not to say Lockheed management preferring to sell Hudsons to Britain for more money helped...)
Lockheed have had hundreds of Lightnings on order by the French and British, both the non-turbo and turboed versions. This is before XP-51 makes it's 1st flight. Hundreds of expensive fighters on order was an eye-watering amount of both hardware and money back in 1940 USA. Add also the USAAC/AAF needs and there is a veritable flood of fighters needed, a thing was in written before 1941.
Lockheed was making their A/C in the production line(s); the 'more/less hand-building them' was true for prototypes.
It took Lockheed an obscene amount of time to deliver the 1st YP-38 after the XP-38 crash, not helped with the aircraft being twin-boom (so there are three smaller fuselages to make per each A/C - not as conductive for fast production vs. a single bigger fuselage).
Now, let's point the finger to the AAC/AAF - they missed the opportunity to contract another source for the P-38s in a timely manner, that meant 2 things at least:
- any major change to a production line meant loss of fighters delivered by weeks
- obvious thing of not having as many of high-performance A/C for the needs of the global conflict
We can recall that P-47 was supposed to be made in 3 factories, A-20 was made in two (3?) factories, B-17, B-24 and B-29 also had more sources each.
AAC/AAF was also too late to test the YP-38 under low-temperature conditions, combined with testing them for suitability above 25000 ft; NACA received the YP-38 a bit too late, and their recommendations to lover the drag and increase the Mcr were never implemented.