Try to merge the Linux partition back into the original partition. Maybe that will allow the Windows partition to be restored to its original location/position. Otherwise, you will need to use delete the Linux partition & use Bootcammp Assistant to remove Windows & remerge the Windows partition into the macOS partition. If you can do this, then you can use Bootcamp Assistant to reinstall Windows. When using Windows Bootcamp, you cannot modify the partitions once you have installed Windows. I have seen a much more knowledgeable & respected forum contributor mention on this forum that you cannot triple boot a system when using Windows Bootcamp.
If you cannot merge the partitions back into the macOS partition, then you will need to erase the whole drive followed by reinstalling macOS & restoring from a backup as well as using Bootcamp Assistant to reinstall Windows & restore from a backup.
If you want to install Linux on bare metal, then install Linux to an external drive. This would be my recommendation even if you were not using Windows Bootcamp.
You should consider installing Linux into a Virtual Machine assuming your Linux workload doesn't need GPU hardware acceleration and your Mac has sufficient resources to support Linux in a VM. Installing Linux or even Windows in a VM is the best option if depending on your needs. For one, you don't have to reboot to access the other OS. I personally never liked rebooting to access another OS, but maybe that is just me.
I never recommend partitioning any drive, but especially not a boot drive. People almost always will realize much later that one or more of the partitions is too small, so they will need to remove at least one partition to fix things. Modifying partitions is always a risk since you can easily corrupt an OS like you found out here, or you can even lose access to the data or possibly even destroy your data. No matter what, it always involves lots of time, work, and risk. Unfortunately if you want/need to use Windows on bare metal, you will need to partition the macOS boot drive. Fortunately Linux is very happy to be installed to an external drive so you don't have to risk modifying any partitions on your main macOS boot drive.