Can I stay in Germany after my residence permit expires?

Hi all, I'm from the UK and have a German residence permit that is valid until 31st May this year, however I would like to stay in Germany in June as well. Prior to obtaining said permit, I used the 90 days I was allowed to stay here. However my understanding is that they will have reset by the time my permit expires and this will have a "new" 90 days which I can use to stay in June. Is this possible to do using the part of my 90 days, or will they not reset while I have a residence permit? The information I've found online is unclear. Thank you!