Hi @abhijeet khopade ,
As per my knowledge, It is impossible to automatically disable a SharePoint Online site after a certain time. We can delete a site and restore a site manually as an alternative. When you, as a global or SharePoint admin in Microsoft 365, delete a site, it's retained as a deleted site for 93 days. Also, all contents within it are retained for 93 days. You can restore the site and all contents within it at any time during the 93 days.
Reference:
Delete a site
Restore deleted sites
If an Answer is helpful, please click "Accept Answer" and upvote it.
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.