Hi Murilo,
In D365 CE, there are two ways to prevent users from creating duplicate records, duplicate detection rule and alternate key.
1. duplicate detection rule
Please refer to the steps in https://rocketcrm.co.uk/dynamics-365-duplicate-detection-rules/
Set the rule as follow.

After publishing it, when users create or edit an Account that tax customer number field value is duplicate, as long as they click Save button, they will see the "Duplicate records found" pop up to remind the users that the field value of this record is duplicated.

If the user click "Ignore and save" button, the record will be saved. Therefore, the duplicate detection rule can remind users of duplicate record, but users can still save it. This is not mandatory to prevent users from creating duplicate records.
2. alternate key
With alternate key, we can forcibly prevent users from creating duplicate records.
Please refer to the steps in https://powerobjects.com/2015/08/21/utilizing-alternate-keys-in-dynamics-crm-integrations/
Note that the prerequisite for the success of alternate key activation is that there is no duplicate value of the selected field. In this case, we need to make sure that there are no accounts with duplicate values in the tax customer number field before creating alternate key.
Set the alternate key as follow.

After it is active, when users create or edit an Account that tax customer number field value is duplicate, as long as they click Save button, they will see an error to mandatory prevent users from saving this record.
