House for rent? In a big or small town?

Hello. Where better to buy a house or flat for rent? In a small city of 100,000 inhabitants, or in a large city such as Warsaw, Gdańsk, Kraków? It is known that in a large city rent is more expensive, but apartments are also more expensive. Certainly, there is also a greater demand, but whether or not too much. If you were to buy a flat for rent now, where would you buy it? In which option is the better rate of return on investment, assuming that the apartment will be rented all the time? Thanks for the answers and best regards. Davson.