Personally, I think you should consider the school first.
First of all, we have to recognize our purpose of going to college, which is that we want to study our favorite majors and then master professional knowledge and skills to realize our dreams.
If you want to make your major more proficient, go to a good school, which is essential.
When you enter a good school, you will find that not only can you better master professional knowledge and skills, but also allows you to experience more of the atmosphere of a good school, meet more talented people, broaden their horizons.
Particularly when you graduate and look for a job, people will only ask you which school you graduated from, not which city you studied in, because a group of companies consider more of your personal comprehensive ability.
Some people say that it is better to read a thousand books than to travel a thousand miles, of course this is all very important, but the premise is that you must have a skill.
As for your favorite city, I do think that if you really want to experience life in that city, you can use your vacation time to visit there for a few days, or live there for a month or two to experience the local customs and culture.
And what's more important is that the time spent studying at university is unrepeatable and there is no chance to choose it again, but the city you want to go to can be completely utilized in the future.