Create your new Entity with Attribute ID in the Domain Model.
Then you could create a Microflow for the OnChange Event on this Checkbox.
Normally, in this Microflow, the Paramater of this Object will be automaticly added and one Attribute of this Parameter is the ID.
Now you can create your new Entity in the Microflow with Create Object and set the Attribute ID with the $Paramater/ID
Hope this helps,