If you remove Teams licenses from users, they will lose access to Teams and the files stored in Teams. However, the files will still be available in SharePoint, as Teams stores files in SharePoint document libraries. So, users will still be able to access the files in SharePoint, but they will no longer be able to access them through Teams. If you want to make sure that users can access the files in SharePoint after their Teams licenses are removed, you may want to consider moving the files to a SharePoint site or library that is accessible to all users.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.