Hi @Siraj Ahmad
There are several reasons why a file may open as read only:
1.Antivirus programs may open potentially unsafe files as read-only. Check with your antivirus provider to learn how to adjust these settings. BitDefender, for example, has content on adding application exclusions here: How to add application or process exclusions in Bitdefender Control Center.
2.If you have libraries with Checkout Required, or Validation columns or metadata, or when Draft Item Security is set to either Only users who can edit or Only users who can approve items in Version Settings of the library, these items will be synchronized as read-only. For more information, see Libraries with specific columns or metadata.
3.An Office document opens in Protected View even though you enable the "Open Office documents as read/write while browsing" policy setting. For more information, see An Office document opens in Protected View even though you enable the "Open Office documents as read/write while browsing" policy setting.
You could read this official article to check the causes and solutions:
https://learn.microsoft.com/en-us/sharepoint/troubleshoot/lists-and-libraries/files-open-as-read-only-and-cannot-check-in-or-out#cause
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.