What happens to my H1B visa if I plan to go to the US on F1 visa instead?

I got F1 visa issued in the year 2013, I didn’t travel. In the year 2017 I got H1B visa but my company did not send me to the US. I resigned and tried to go on H1b by getting visa transferred but it did not work out. Now again I’m planning for F1 visa this January. My question is what happens to my H1B visa if I go on F1 visa? Will I have to apply for H1B after studies or the same can be granted on previous h1b visa,since I would be under cap exempt.