Does sound waves go only through air?
No. They can travel through any object that is not in a vacuum. They can travel through air, through metal, through string, through water, etc.. However sound cannot travel through space. That is why it is the writer’s discretion to include space ship sounds in movies such as Star Wars and Star Trek. They would in fact be silent in space.