If you are only transiting in a country, you might not have to apply for the full travel visa but only for a short-term transit visa. A transit visa is usually valid only for 24 hours or a few days and is faster and cheaper to get. The biggest advantage is that you may still be able to visit the city for a few hours or days before continuing your trip to your final destination.
The process is the same as applying for a tourist visa. Simply choose the country you plan to visit to see if there is a specific transit visa and complete the online application form. It takes 5 minutes to apply and usually only passports and flight tickets are required. In a few days, you will receive your approved visa in your email.
The price of a transit visa changes from country to country, please check the visa details for your destination to find all the details. However, a transit visa is usually cheaper than other travel authorizations.