The F-35 was Lockheed's entry in the Joint Strike Fighter program. The JSF has roots going back to 1996. The X-35 first flew in 2000. The F-35 first flew in 2006, and didn't enter service until 2015(!!).
That's nearly 20 years to develop a single airframe. Yes, it's the most sophisticated airframe to date, but 20 years is not trivial.
The F-35 had many issues during trials and early deployment - some are excusable for a new airframe and some were not. I suspect the issue wasn't "move fast, break things" but rather massive layers of bureaucracy and committees that paralyzed the development pipeline.
The F-22 was part of the Advanced Tactical Fighter (ATF) program which dates back to 1981. It's prototype, the YF-22 first flew in 1990, and the F-22 itself first flew in 1997. It entered production in 2005. Again, 20+ years to field a new airframe.
Something is very wrong if it takes 20+ years to field new military technologies. By the time these technologies are fielded, a whole generation of employees have retired and leadership has turned over multiple times.