you would need to set up an external automation that triggers whenever someone purchases your product.
The automation should listen to stripeās checkout.session.completed or charge.succeded AND product.id fields, then find the subscriber on your list using the email they used to buy the product, and finally change the subscriberās status to premium.
You can do this via API/webhooks or with Zapier/Make