function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nandhini GovindrajNandhini Govindraj 

How the user can edit the record but other users can read access only

SwethaSwetha (Salesforce Developers) 
HI Nandini,
You can do a manual share of records. Manual sharing lets record owners give read and edit permissions to users who might not have access to the record any other way.

See related info : https://salesforce.stackexchange.com/questions/175660/how-to-give-edit-access-to-a-user-to-the-records-that-are-not-owned-by-him
https://trailhead.salesforce.com/content/learn/modules/data_security/data_security_records

If this information helps, please mark the answer as best. Thank you
The TechieThe Techie


Make OWD setting Private for that object and with sharing setting provide access to other users.
https://trailhead.salesforce.com/content/learn/modules/data_security