A shallow copy creates a new object but does not recursively copy nested objects within the original object. Changes to nested objects will affect both the original and the copy.
A deep copy creates a completely independent copy of the original object and all nested objects, recursively. Changes to the original or its nested objects do not affect the deep copy.