spacecraft
General term for any vehicle designed for space travel, including satellites, probes, and crewed vessels.
The spacecraft landed on Mars.
Development of a new spacecraft is underway.
ロケット refers specifically to a rocket (launch vehicle), whereas 宇宙機 is the vehicle that travels in space.
Compound of 宇宙 (uchū, 'space') and 機 (ki, 'machine').