Merge all space into one volume
After trying to reboot, your main partition (disk0s2) won't be recognized as APFS container because the partition type is wrong (FFF...) and consequently your Mac won't boot to the login screen.

You have to boot to Internet Recovery Mode and remove the Apple_Boot volume (now disk0s4 - after a reboot probably disk0s3), repair the partition type of disk0s2 and finally expand the APFS container.

Under certain circumstances SIP has to be disabled to modify the GUID partition table.


Boot to Internet Recovery Mode (or a third party drive).
Open Terminal in the menubar Utilities > Terminal
Get an overview with diskutil list
Get an overview of your internal disk with the disk identifier found in the previous command. Below I assume the disk identifier of your internal disk is disk0 (SSD) (replace it with the one you have found in your environment).

gpt -r show disk0

Remove the 134 MB "Apple_Boot" partition:

diskutil eraseVolume "Free Space" %noformat% /dev/disk0s3

Unmount disk0 with diskutil umountDisk disk0
Then remove and re-add the second partition with the same size but proper type (APFS):

gpt remove -i 2 disk0
gpt add -i 2 -b 409640 -s 774363776 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0

Verify disk and volume:

diskutil verifyDisk disk0
diskutil verifyVolume disk0s2

Expand the APFS container to fill the free space.

diskutil apfs resizeContainer disk0s2 0

Verify disk and volume:

diskutil verifyDisk disk0
diskutil verifyVolume disk0s2