How can I make a field read-only?

You can make a field read-only in the Edit page of a feature. Create an edit layout, select the appropriate field, and add Updatable Conditions in the Field Criteria region.

When the conditions are met, the field can be edited in the Microsoft 365 add-in. Otherwise, the field remains read-only.