A Microsoft file hosting and synchronization service.
Hello, Steven
Per your description you want to change a default expiration time for the shared files.
This parameter is managed by SharePoint administrator. In SharePoint admin center select Policies > Sharing > under Choose expiration and permissions options for Anyone links check the box next to These links must expire within this many days and set the amount.
Users can set an expiration date for the links selecting a file or folder and Share > Edit drop down menu > Link settings > Set expiration date.
I hope this information was useful for you. Feel free to post back to us if you need further assistance.
Best Regards,
Igor