The reason why two Account Plan records are created whenever the Account is marked as a Customer is that the flow is configured to evaluate when a record is created and every time it is edited. This means that the flow will run both when the Account is inserted and when the Account is updated by the Apex trigger. Since the flow and the trigger both create an Account Plan record, this results in two Account Plan records being created for the same Account. To avoid this, the flow should be configured to evaluate only when a record is created or only when specified changes are made to the record. This way, the flow and the trigger will not conflict with each other and only one Account Plan record will be created . Reference: [Record-Triggered Flows], [Configure When a Record-Triggered Flow Runs]