The rapid progress and then stalling is not caused by lack of investment, it's the harsh reality of physics.
We cracked how to have machines fly like birds and then it's low hanging fruit to achieve amazing things in atmosphere.
While exploring that, rocketry makes nearby space possible, and the moon is "right there".
But then things are exponentially farther away, and many of them bigger gravity wells, making the trips too long and difficult to make two way trips.
In a very very short time we got heavier than air flight, rocketry, fission, mass production, and all sorts of robotics and computing. But reach breakthrough has a point where we scratch our heads trying to do better. A ton has been spent and will continue to be spent trying to crack controlled fusion. Someone that lived through us managing to split an atom for the first time to fairly widespread deployment naturally assumed fusion would be next and maybe not too long after something that would extract energy directly according to Einstein's most famous formula.