In Teams and SharePoint there is the ability to share files and folders with an expiration date.
Steps
1. Open Teams > Go to Teams tab.
2. Go to your Team and click the channel where your files reside.
3. Click the Files tab.
4. Click Open in SharePoint
5. Hover over the file or folder that you want to share and click the Share button as indicated in red.
6. Click Anyone with the link can view.
7. Click Set expiration date and choose your desired date of expiry > (Optional) Set a password that you will share people to access the file/folder. > Click Apply
8. Enter in the people intended for the file/folder share > Click Send