Hi @Harsha Vardhan Reddy,
Thank you for posting in this community.
This issue usually occurs when your account for Office desktop applications is different from your account for SharePoint Online.
Most likely your Office account has no permissions to the site. Please check and make sure that you are using the same account and that the account has access to the site.
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.