Assuming you're using a filesystem that supports it like ZFS, Btrfs, XFS, etc, it's as simple as:
cp -R --reflink=always /path/to/source /path/to/dest
On macOS with APFS: cp -R -c /path/to/source /path/to/dest
That's it. You get a copy that only stores additional space for metadata, not the files themselves.