Hi @IBN
Welcome to Q&A forum!
If the guest cannot access the files, you could try to follow these steps to see if this setting is correct in your environment:
1)In O365 admin center, please check if you have enabled guest access in Teams.
2)Check if you have enabled these options in M365 Groups Settings.
3)In SharePoint Online Site, please check these settings:
In addition, to narrow down this issue, you could use this tools to identify issues that might prevent guest users from accessing files in Teams.
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.