When a mother stack is created, it is given a unique identifier (ID). This ID is used to track the stack and associated resources. If the mother stack is deleted, all of its associated resources are also deleted.