Questions & Answers about Die Bevölkerung in der Stadt ist jung.
The preposition in is a Wechselpräposition (two-way preposition).
• When it indicates location (answers “Where?”), it takes the dative case.
• When it indicates direction or movement (answers “Where to?”), it takes the accusative.
Here we describe a location (“in the city”), so we use dative. Stadt is feminine, and the feminine dative article is der, giving in der Stadt.