If the Mac partition is the first partition on the drive, then it may be possible to delete the Windows partition & merge it back into the Mac partition. However, you want to follow @leroydouglas' suggestion to make a good backup of all the data on that drive just in case something goes wrong since modifying partitions is risky. If something goes wrong while modifying the partitions, then you may lose all of the data stored on that drive.
If the Mac partition is the 2nd partition, then you have no other option that to erase the whole drive in order to have a single partition on that drive.
FYI, people should always have frequent & regular backups of the data stored on external media (including the cloud) which contains important & unique data. And of course the main drive on the computer should also have frequent & regular backups because there are a lot more new ways to permanently lose access to the data stored on the internal SSD of the recent Macs due to all of the hardware, software, and security changes.