What happens to the purchases I made on iTunes if my info on my iPhone gets deleted?

So my phone got deleted completely not the phone just the information all of it what's happens to my purchases that I made on the App Store and iTunes do I have I re-buy everything or is there a way I can get it back for free

You should just be able to sign in with your apple i.d. And it should all be there.