I’m sure it will! Put some stone at the bottom of the pot so the water will drain and don’t ruin the roots, place it in the sun and take back inside when it’s cold or the roots will freeze.
Mine is outside under a laurel tree. It’s in the garden and we water it only in summer when is super hot. Cut the branches every now and then or they become “woody” and hard.
Hope this will help you grow your new rosemary :)