Thank you so much for replying so quickly!!! I think the drive is fixed now I have the full 1TB space again! I hope it's safe to try installing windows again. Here is the output:
Started APFS operation
Aligning grow delta to 160,995,131,392 bytes and targeting a new physical store size of 999,995,129,856 bytes
Determined the maximum size for the targeted physical store of this APFS Container to be 999,994,101,760 bytes
Resizing APFS Container designated by APFS Container Reference disk1
The specific APFS Physical Store being resized is disk0s2
Verifying storage system
Using live mode
Performing fsck_apfs -n -x -l -S /dev/disk0s2
Checking the container superblock
Checking the EFI jumpstart record
Checking the space manager
Checking the space manager free queue trees
Checking the object map
Checking volume
Checking the APFS volume superblock
The volume Macintosh HD was formatted by hfs_convert (945.230.6) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume Preboot was formatted by hfs_convert (945.230.6) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume Recovery was formatted by diskmanagementd (945.230.6) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume VM was formatted by apfs.util (945.230.6) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Verifying allocated space
warning: Overallocation Detected on Main device: (878023+57) bitmap address (7c8d)
warning: Overallocation Detected on Main device: (878080+64) bitmap address (7c8d)
warning: Overallocation Detected on Main device: (878144+64) bitmap address (7c8d)
warning: Overallocation Detected on Main device: (878208+21) bitmap address (7c8d)
warning: Overallocation Detected on Main device: (878255+17) bitmap address (7c8d)
warning: Overallocation Detected on Main device: (878272+64) bitmap address (7c8d)
warning: Overallocation Detected on Main device: (878336+7) bitmap address (7c8d)
warning: Overallocation Detected on Main device: (878431+33) bitmap address (7c8d)
warning: Overallocation Detected on Main device: (878464+64) bitmap address (7c8d)
warning: Overallocation Detected on Main device: (878528+22) bitmap address (7c8d)
warning: Overallocation Detected on Main device: (883407+33) bitmap address (7c8d)
warning: Overallocation Detected on Main device: (887919+17) bitmap address (7c8e)
warning: Overallocation Detected on Main device: (887936+64) bitmap address (7c8e)
too many warnings generated; suppressing subsequent ones
The volume /dev/disk0s2 appears to be OK
Storage system check exit code is 0
Growing APFS Physical Store disk0s2 from 838,999,998,464 to 999,995,129,856 bytes
Modifying partition map
Growing APFS data structures
Finished APFS operation