I was born and raised in Yokohama, so I can personally vouch for the fact that purchasing the one-day pass is the best way to ride buses economically in the city. Sold on board, the pass costs just 600 yen per adult and allows unlimited rides on Yokohama City buses on the day of purchase. The standard fee for each ride is 220 yen per adult so you will save money if you plan to take the bus more than twice.
Learn more about Yokohama’s one-day passes here: https://www.city.yokohama.lg.jp/lang/residents/en/bus-subway/bus/fares-bus/one-day.html