I installed MacOS on disk 0. I have one HDD drive which is split into multiple disks. Now I would like to merge disk 0 and disk 1 (same hdd) to one disk. Is it possible and what should I do? For illustration I have added a screenshot with the current partitioning.
You can use Disk Utility.
Personally, I would copy all data from each partition to another storage device; creating a parent folder for each partition (using Finder); or, create a disk image (.dmg, etc.) file using Disk Utility. Then, you can recover if anything goes wrong. Here is an article describing the different types of disk images, how to make them, and why one might choose one over another: https://support.apple.com/guide/disk-utility/create-a-disk-image-dskutl11888/mac
But, if you intend to merge two partitions, both containing data, relying on a software process which cannot be undone (sans great expense, difficulty, and uncertainty)... you are braver than I am.
Here is an article describing the different partitioning options: https://www.lifewire.com/disk-utility-add-delete-resize-existing-volumes-2260078
If you want to run any Erase security options, you are better off running them on each partition BEFORE deleting each. But, if the HDD is a SSD (or FLASH), I believe those options are irrelevant. Wherever you see "APFS", that volume is on a SSD (using MacOS 10.13 or later).
If either partition is bootable, you will need to make it bootable again. I noticed that "Install MacOS..." is one of your partitions. Here is an article describing how to use Terminal (sudo... createinstallmedia command) to do that: https://support.apple.com/en-us/HT201372
But, I have never attempted to use a bootable installer partition for "additional storage"; may not work, or have unexpected results.
Obvious, but it's gotta be said Back Up everything first.
Looking through DiskUtil's Man page, I can't find a way you could do it without erasing both disks, so if you are wanting to just expand the installation on disk0 to envelop disk1, you'd probably be looking for some proprietary software to do it and I'm not even sure there would be anything out there capable with APFS (and the first page of a quick google search turned nothing up).
mergePartition verb for diskutil sadly only works within one disk, not across two disks unless they are already joined together in an AppleRAID, CoreStorage or an APFS container.
If you don't mind erasing the disks and restoring your backups after the fact, then you can either run
diskutil resetFusion, which will grab the two internal drives and set them up as a Fusion Drive configuration, or you can run
diskutil APFS createContainer disk0 disk1, after which you will need to look up which "diskx" the new APFS container is, and then run
diskutil APFS addVolume diskx APFS "Macintosh HD"
If you're using Time Machine for your backups, it should happily reinstall macOS and restore all your applications and data in one step for you. Just start up from the Time Machine Backup disk when you start up the computer, use diskutil on the internal drive from there, and then select "Restore Backup" from there instead of "Reinstall macOS"