When you refresh a sandbox, the surl/Public Share feature will not work in the sandbox without some changes.
Site Url: The site url needs to be changed in two places, from the prod site to the sandbox site. Go to Setup-->All Sites to find the url of your surl site in the sandbox. Highlight the url and copy it.
In S-Drive Configuration-->Micro Services, change the S-URL Base URL to the sandbox site
Go to Setup-->Custom Settings. Find SDriveConfig and click Manage. Edit SUrl_Community_BaseUrl and paste the new sandbox url in the value field.
Remote Site Setting: if this is a new sandbox, you’ll need to add a new remote site setting with the url from step 1.
Self-Signed Certificate: Create a new self-signed certificate in the sandbox and assigned it to the Surl Connected App. Then update SUrl_Community_Certificate with the new certificate name. This can be found in STEP 3 of the https://docs.sdriveapp.com/knowledge/s-url-and-public-share-setup-s-drive-2-7-12-and-la#S-URLandPublicShareSetup-STEP3:CreateaSelf-SignedCertificate instructions.
Consumer Id: Get the new consumer id and update SUrl_Community_ClientId. Instructions are in STEP 4 (#10) of https://docs.sdriveapp.com/knowledge/s-url-and-public-share-setup-s-drive-2-7-12-and-la#S-URLandPublicShareSetup-STEP4:CreateaConnectedApp
Surl user: The user used for the surl community (not the guest user, but the one you created) will have a new username in the sandbox--the sandbox name is appended to the end. The Custom Setting for this will need to be updated. Find the user. It usually has surl in the name, so you can search for surl in the global search box. Once you have found the user, copy the username. Go to Setup-->Custom Settings. Find SDriveConfig and click Manage. Edit SUrl_Community_Username and paste the new username in the value field.
Publish the community: When creating or refreshing the sandbox, the community will exist but may need to be published again. Go to Setup-->All Sites and find the surl community. Click Builder, and then Publish.