How to retrieve data on my iPhone?

So basically my friend had my Apple ID he used his iPad and put my Apple ID in find my iPhone thing then he clicked erase all data now I lost all my data it's like a brand new phone now I need my data back help I don't remember if I backed it up or not please help

If it's not backed up then the data has gone.

You should NEVER give out your security credentials to anyone else. Your "friend" needed more than your Apple ID to erase your phone, he would also have needed your Apple ID password and could only get that from you.

Change your Apple password immediately and check whether any of your data was saved to your iCloud account. You may also wish to check whether the host computer you should have been using for regular back ups via iTunes has a restorable back up.

You don't. Not doing backups is careless, trusting your friends was just plain dumb.

Through iTunes, if it is sync and do get Leo Privacy Guard in order to give it utmost security to your device.