How to use the toilet
Most toilets in stations and department stores can be used for free. There are some restrooms that collect usage fees for extraordinary service in the station premises, etc. as an exception, but in Japan it can be said that there are only a few.
Many of the city centers introduce a style that is used worldwide, called "western style," and should not be confusing. Moreover, in addition to the function of general western style toilet, you will frequently see Japan's own high-performance functions such as opening the lid when approaching, automatic flushing, washing the buttocks with hot water, etc. These may be said to be a specialty offered in Japan, so please try if you have the opportunity.
In addition, there is a space called a powder room with a comfortable space in the toilet that allows you to apply makeup, change clothes, change a baby's diaper, breastfeed, etc. However, please be aware that baby-related facilities are not often found in men's toilets.
Meanwhile, there is what is called "Japanese style" as a traditional Japanese toilet, which may be seen at rural stations and airports. This is not a style that you sit on like a western style but requires that you squat down over the toilet to finish your business. If you are not familiar with it, you may make a mess, but you should have few failures if you go one step ahead after squatting down.
If you want to go to the toilet while sightseeing, if there are large commercial facilities such as department stores and shopping malls nearby, the most certain action is to use the toilet of such facilities, and many of them have the comfortable powder room as described above. Other than that, unless you are in a small city center shop, all coffee shops and fast food restaurants, including chain stores, have toilets.
There are many cases where you can use a toilet at a convenience store, but in most cases, a poster stating "Please speak to the clerk beforehand." Before you use it, say "Would you mind if I use the washroom?" And when you use it, if possible, please purchase at least one item before you go out. By the way, in Japan, I say "I will rent a toilet" in the case of using a toilet by the kindness of shops.