Hi @sweetu ve ,
There are two ways for your reference:
1, You can share files by directly granting user permissions.
Right click on the file to be shared-->Manage-->Advanced--> Stop Inheriting Permissions-->Grant Permissions-->Enter user account-->Choose the appropriate permissions-->Share.
Then, the user will receive an email like this:
Click Open and then the file can be view online.
2, Open the SharePoint admin center, expand Policies, and then select Sharing.
Fill both blanks with the maximum value.
But this still can be expired.
For more information, please refer to:
https://learn.microsoft.com/en-us/microsoft-365/solutions/best-practices-anonymous-sharing?view=o365-worldwide
https://learn.microsoft.com/en-us/microsoft-365/solutions/microsoft-365-guest-settings?view=o365-worldwide#sharepoint-and-onedrive-organization-level
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.