Helmet laws for cyclists are set nationally and sometimes locally, so the honest starting point is that there is no universal rule and you should check the transport authority or embassy page for the specific country. The global picture clusters into a few patterns. A minority of countries, notably Australia and New Zealand, require helmets for all riders with real fines. A larger group requires them only for children under a threshold age, commonly somewhere between 12 and 18, with the fine typically falling on the parent or the adult rider responsible. Many countries, including most of Europe's big cycling nations, have no helmet mandate for adults on regular bicycles at all.
Where fines exist they are usually modest on-the-spot penalties, but the bigger financial exposure is insurance: after an accident, claims can get complicated if you were breaking a helmet law at the time.
Regardless of what the law says where you are, an unfamiliar traffic culture is exactly the situation where a helmet earns its keep. Rental shops usually offer them cheaply, so the practical answer is wear one and let the legal question stay academic.