"Lost" 300 GB of disk while trying to install Windows via Bootcamp
You didn't lose any storage, the partitioning system simply forgot to put it back into usable form.

/dev/disk1 would be your physical disk.

/dev/disk2 is an APFS disk architecture, which, in laymen terms, is a fake virtual disk within a physical disk. This is where the macOS and your files on macOS are stored.

Bootcamp Assistant encountered an error which caused it to stop creating a Windows volume. After it stopped it didn't reallocate the free space to /dev/disk2.

Use Disk Utility to repartition your physical disk, it can be found in Launchpad > Utilities. Find the physical drive item on the tree view on the left, it should read something like the name of my physical drive, which is highlighted in the image below:

Press the Partition button seen on the top of the Disk Utility window while your physical drive is selected. It should ask you if you want to format the physical drive or the APFS Volume. Choose to format the physical volume. It should show you a pie chart of your volumes like this:

Drag the small white circle that is positioned outside the split between Macintosh HD and Free Space into a position where Macintosh HD completely covers Free Space. Press apply, and it should automatically format your physical drive to fill up the free space that Bootcamp Assistant un-allocated. After the operation completes successfully you can safely quit Disk Utility.