You want to make sure not to touch the two "Apple" partitions shown as #1 and #4. Delete the other two partitions listed as "Windows Basic Data" and "Asahi" which are partitions #2 and #3. Or maybe see whether deleting #3 Asahi will allow it to be merged into #2 "Windows Basic Data". I don't know how the layout will look afterwards since macOS tends to do things much differently than Linux and Windows in regards to working with & displaying partitions.
It may be best to see if partitions #2 & #3 can be merged together, plus merging the "free space" area into it as well. I don't usually do a lot of partition manipulations like this with macOS (I usually just split or add them) because Disk Utility and diskutil are really terrible partition manipulators, but they are the only options for correctly creating the disk layout required by macOS.
FYI, it is rare to see a "free space" area on a macOS drive because Disk Utility normally doesn't allow for it since Disk Utility will just make what would be "free space" into another partition, but as you can see the "free space" area is not part of any partition as it has no identifier. I'm not sure how Disk Utility treats this in the GUI in order to select the free space to create a new APFS Container for macOS since actual "free space" is so rare of an occurrence. I would try to see if the #3 Asahi & "free space" areas can be merged into #2 Microsoft Basic Data" even though there is no name for the #2 partition.
The goal is to get the area currently listed as partition #2 & #3 & "free space" together where you can create a new single APFS volume occupying that same space. It may involve using the "Partition" tab in Disk Utility, or it may involve the "Erase" tab in Disk Utility to create the APFS volume/Container, but make sure not to touch either the #1 or #4 Apple partitions since these are required by the M1 Mac.
Here is an article which shows the drive layout for the M1 Macs along with a visual representation (no details on modifications):
https://eclecticlight.co/2021/01/14/m1-macs-radically-change-boot-and-recovery/
You may be able to use the command line utility "diskutil" to deal with the space, but it is a bit confusing to use for manipulating partitions even if you are used to using the Linux command line utilities for modifying partitions. Looking over the "diskutil" options, the best I can see is making partition #2 & #3 into free space and hoping that the Disk Utility GUI can then be used to create an APFS volume by utilizing the free space. I don't see anyway of using the "diskutil" command to creating a volume from the free space since there are no identifiers for the free space and the "diskutil" commands all require an identifier to know what part of the drive to utilize. From the screenshot the following commands should remove partitions #2 & #3 and make it "free space" (according to "man diskutil" and an example at the end of the manual):
diskutil eraseVolume free free disk0s2
diskutil eraseVolume free free disk0s3
There is another macOS command line utility, "gpt", which should be able to take that free space and make it into a partition which the Disk Utility GUI should be able to utilize if it cannot work with the "free space" area on its own. I have never used the "gpt" utility for manipulating partitions, although I have used it to restore the backup partition table. According to the gpt "man" pages the following command should create a new APFS partition in the first available free space and utilize all of that free space (in theory):
gpt add -t apfs disk0
To understand these commands you can view the commands help or manual "man" pages:
man diskutil
man gpt
If none of this works, then I would suggest using the Asahi Linux installer to create a partition within the free space. I've never used Asahi Linux yet, but many Linux installers will provide an option for customizing the partition layouts, but Asahi is still a work in progress too. Then boot back into Recovery Mode and use the Disk Utility GUI to properly erase the volume as APFS. You always want to use the tools provided by the OS you want to install to properly configure the boot drive even if Linux tools can do the work as well since only the macOS tools know all the little secrets for what macOS needs to work properly. Same rule applies to every OS.