PrEP is not a medication that you need to take forever. You get to decide when to start and stop PrEP. Just remember to take take PrEP as prescribed for it to be the most effective. And once you’ve started taking PrEP, you should stay on it for at least a month after you were last exposed to HIV.
If you think that you’re no longer at risk of getting HIV, talk with your doctor before you stop taking PrEP.