Hi
To add users to a role after purchasing a product you have to look into Membership Product Types.
Basically you create a Membership Product Type and add select this newly created Product Type on the Product you want to have the role added.
See the howto here:
https://hotcakescommerce....ership-Product-Types