No, N.A.S.A. did not invent the first spaceship. The first 'inventors' were more ideators or dreamers such as Galileo, da Vinci,and many others.Dr. Robert Goddard in the U.S. was a rocketeer who showed the feasability of unmanned rocket flight and others steered the technology towards warfare. After WWII, interest in peacetime space exploration gathered many minds on two continents to engineer the 'how to do it',or logistics, of safe, manned travel outside of Earth's atmosphere. The Soviet Union was first, and the U.S. close behind. This became known as the 'space race'. The National Aeronautics and Space Administration (NASA),became the abbreviation for the U.S. effort. NASA, with the backing of the U.S. taxpayer,succeeded in placing 12 men on the Moon by 1972.There is really no one or two 'inventors' of space flight humanity's presence in space is the result of thousands of minds,millions of man hours, and billions of dollars!
The first man made objects to reach space, (defined as an altitude of 100km, 62 miles) were the Nazis' V 2 rockets. Of course they didn't reach orbit. The first thing to reach orbit was the USSR's Sputnik satellite. The first manned capsule was also put into space by the USSR. So NASA certainly didn't invent the first spaceship.