Per my research, there is no direct way to automatically set SharePoint documents as read-only mode based on modified date condition. The read-only mode can be set only on SharePoint site collection.
As a workaround, you could set all documents in the document library as read-only mode by following JSON codes. Note: JSON codes are for Name column.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "a",
"txtContent": "@currentField",
"attributes": {
"target": "_blank",
"href": "[$FileRef]"
}
}
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.