Walking is the only sensible way to explore the old city — the lanes are too narrow for cars, the gradients are easy, and you would miss everything otherwise. Wear good shoes; the cobbles are uneven.
Outside the walls, white-and-yellow shared taxis run set routes for very low fares, and private taxis can be hired by the hour or the day for trips to Wadi Dhahr and other day-trip destinations. Negotiate the fare before getting in. There are no Western-style ride-sharing apps in the city.
The road network out of Sana'a is straightforward but mountain driving in Yemen demands care, particularly at night. Hire a driver who knows the terrain — costs are modest by international standards.