There are two ways to lock a form from being altered. One is to lock the form template from being modified and the other is to lock the form after data entry has been completed.
The first way is to enable the form setting “Lock form designer on export.” When this setting is enabled (see screenshot below), if you share this form with another user, they will not be able to modify the form template.
The second way is to tap on the “Lock” button on the menu bar. When you tap on this button, it locks the record permanently preventing any further data entry on the form.