Following is the stepwise step process:
Navigate to System Properties > Security.
In the Attachment limits and behaviour section, locate the List of roles (comma-separated) that can create attachments: property (glide.attachment.role).
Enter one or more roles separated by commas.
Only roles listed in this property are able to upload attachments to a record. If no roles are entered, then all roles can upload attachments to ServiceNow forms.
Click Save.