You can get to the city center by bus no. 188 from the bus stop Pod Vinici (directly before the entrance to the Residence) to the Strasnicka stop, where you change to metro A (green line). The journey by bus to Metro Strasnicka takes 10 minutes. After that, it's up to you where you go specifically.
For example, the journey from the Residence to the center of Prague - Malostranska takes 30 minutes.
Public transport tickets can be purchased in the bus by contactless payment.