Setting a workspace as read-only prevents public users from making changes to the workspace. This is helpful if you are sharing your workspace link publicly (e.g. job description, blog post, readme).
To set a workspace as read-only, click the share button in your workspace and set "Allow anyone to read-only".
Note that team members and workspace guests will have edit access. There is no way to revoke edit access for these users.