Assign new role to user after puchasing a product I installed and configure Drupal commerce successfully in Drupal 8 and now I want to change the role of a user when he/her purchase a product. E.g I have a product type test and user role paid now when the test user purchase a product I want to assign the paid role to this user after successful purchase.

I did this in Drupal 7 via rules module but how in Drupal 8.
For Drupal Commerce on Drupal 8, Rules is not complete or integrated. This leaves many such tasks like this for custom development. Fortunately, it's also easier to alter individual parts of the Commerce system thanks to Drupal 8's object oriented architecture. In this case, you'd write a new class called an event subscriber to assign that user role on the "placed" transition - the point at time an order completes checkout or is placed by an administrator. It should then handle assigning the user role to the order owner.

There may be contributed modules available for Rules integration to support individual tasks like this, but it hasn't been a core priority as of yet while we focus on other major feature groups (e.g. shipping, addressbook, recurring billing, etc.).