Initial Stamping (F1-OPT extension to H1B, travel abroad)

Good afternoon,

I recently got my H1B approved that will begin in October. I am currently living in the U.S. and working under an F-1 visa, OPT extension. My question is do I need to leave the U.S. (possibly to Canada) to get a new visa for my passport once my H1B begins or can I go to the consulate within the states to obtain the stamp? I want to be able to travel back to visit my family in Spain for the holidays and I can’t seem to find any clear guidance about how to leave the U.S. under the H1B. I typically go to my university and obtain a new I-20 each year before leaving the U.S., but I know this process will change with the new visa.

Thank you for your help!