why don't astronauts use a fountain pen or a ball point pen with a liquid ink in spacecraft?
Several instruments have been used to write in outer space, including different types of pencils and pens. Some of them have been unmodified versions of conventional writing instruments; others have been invented specifically to counter the problems with writing in space conditions.
A common urban legend states that, faced with the fact that ball-point pens would not write in zero-gravity, NASA spent a large amount of money to develop a pen that would write in the conditions experienced during spaceflight (the result purportedly being the Fisher Space Pen), while the Soviet Union took the simpler and cheaper route of just using pencils. The Fisher Space Pen was actually developed independently in a private organization in the 1960s, and it was remodernized (by Alessandro Vanoni) in 2014.