Do you have two partitions? I would imagine so as I can't see a way or shoehorning ext4 into an APFS container. However, that may be how it is configured. You would have to look at Disk Utility to tell. Set the View to "All Devices." That should show the SSD with all of its physical volumes including Containers within the APFS file system.
If you have two partitions, Disk Utility should show them on the Partition tab. If your APFS partition appears before the ext4 partition, you should be able to delete the ext4 partition and them recover the free space into the APFS partition.
If the first partition is the ext4, then you cannot merge them. You would have to backup, completely erase the drive, then restore the APFS data to the newly formatted drive.
Here is the support guide for creating and modifying partitions with Disk Utility: Partition a physical disk in Disk Utility on Mac - Apple Support
Nowhere in that article does it suggest setting the View to "All Devices," but I think that would be necessary. You would then select the SSD device in the list, then Partition tab.
I haven't partitioned a drive in nearly forever, and the last time was well before CoreStorage and APFS. So, a lot has changed.