Since macOS Catalina, the startup disk is automatically split into two parts, namely Macintosh HD, the system volume, and Macintosh HD -Data, the data volume. These two entities stores different contents. Mac users can only read the Macintosh HD volume but can read & write to the Macintosh HD -Data volume.
Read more: Macintosh HD vs. Macintosh HD Data: What Are the Differences
You can not merge Macintosh HD and Macintosh HD - Data volumes. macOS doesn't allow you to delete any of these two volumes. You should have at least two volumes, Macintosh HD and Macintosh HD - Data in the main APFS container. They guarantee the system operation and store user files respectively.
If you have added extra APFS volumes within the APFS container where the Macintosh HD and Macintosh HD - Data locates, you can merge APFS volumes. However, there is no need to merge extra APFS volumes due to the space sharing feature of the APFS file system.
The intent to merge volumes on Mac is to make more available space for one volume. However, each APFS volume can be given access to the container's shared free space as needed. It automatically shrinks or expands the size of the APFS volume. That's why it is unnecessary to merge extra APFS volumes.
In case you still want to merge the APFS volumes, you can delete the unwanted volumes in Disk Utility. Bear in mind, this will erase all data from the deleted one. If any important file is on it, back up and restore after deletion. The released storage space should be merged into the main Macintosh HD - Data volume.
Read more: How To Merge APFS Containers/Partitions to Get More Space
If you lose files during the process, you can restore the data with Time Machine backup, or try the professional iBoysoft Data Recovery software for Mac.