Forget dd it is copying the whole this use rsync with the directories mounted on the new ssd connected. Firstly let us make certain you setup the new drive with the partitions in the proper order the 1 is supposed to be the efi system partition. An example of gdisk doing this.
root@zeus-H370M-DS3H:~# dd if=/dev/zero of=/dev/sdb bs=512 count=34
34+0 records in
34+0 records out
17408 bytes (17 kB, 17 KiB) copied, 0.00286715 s, 6.1 MB/s
root@zeus-H370M-DS3H:~# dd if=/dev/zero of=/dev/sdb bs=512 count=34 seek=$((`blockdev --getsz /dev/sde` - 34))
34+0 records in
34+0 records out
17408 bytes (17 kB, 17 KiB) copied, 0.00584954 s, 3.0 MB/s
root@zeus-H370M-DS3H:~# gdisk /dev/sdb
GPT fdisk (gdisk) version 1.0.5
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries in memory.
Command (? for help): n
Partition number (1-128, default 1): 1
First sector (34-234441614, default = 2048) or {+-}size{KMGTP}:
Last sector (2048-234441614, default = 234441614) or {+-}size{KMGTP}: +256M
Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300): ef00
Changed type of partition to 'EFI system partition'
Command (? for help): n
Partition number (2-128, default 2): 2
First sector (34-234441614, default = 526336) or {+-}size{KMGTP}:
Last sector (526336-234441614, default = 234441614) or {+-}size{KMGTP}:
Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300):
Changed type of partition to 'Linux filesystem'
Command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sde.
The operation has completed successfully.
You just continue with the proper sizes for the 3 and 4 partitions you need, with 30G used for the second size, 70G the third and just take the rest left over for the swap, it is type 8200 to be chosen. Of course formatting. The first sector is not important it will default to the correct one, just use the sizes in the second and it will do it properly for you.
root@zeus-H370M-DS3H:~# mkfs.vfat /dev/sdb1
mkfs.fat 4.1 (2017-01-24)
root@zeus-H370M-DS3H:~# mkfs.ext4 /dev/sdb2
mke2fs 1.45.6 (20-Mar-2020)
root@zeus-H370M-DS3H:~# mkfs.ext4 /dev/sdb3
mke2fs 1.45.6 (20-Mar-2020)
root@zeus-H370M-DS3H:~# mkswap /dev/sdb4
Now onto some directories to mount
root@zeus-H370M-DS3H:~# mkdir /tmp/ssdboot
root@zeus-H370M-DS3H:~# mkdir /tmp/oldssdboot
root@zeus-H370M-DS3H:~# mkdir /tmp/ssdroot
root@zeus-H370M-DS3H:~# mkdir /tmp/ssdhome
Mount them.
root@zeus-H370M-DS3H:~# mount /dev/sdb1 /tmp/ssdboot
root@zeus-H370M-DS3H:~# mount /dev/sda3 /tmp/oldssdboot
root@zeus-H370M-DS3H:~# mount /dev/sdb2 /tmp/ssdroot
root@zeus-H370M-DS3H:~# mount /dev/sdb3 /tmp/ssdhome
Now for the copying.
root@zeus-H370M-DS3H:~# cp -av /tmp/oldssdboot/* /tmp/ssdboot/
root@zeus-H370M-DS3H:~# rsync -ahPHAXx --delete --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found} / /tmp/ssdroot/
root@zeus-H370M-DS3H:~# rsync -avP /home/* /tmp/ssdhome/
Nano used for at the very least editing the fstab to the make entries with the proper partition ids. My drive and file below in my Pi as an example of it.
root@buster-raspi:~# blkid
/dev/sda1: SEC_TYPE="msdos" UUID="3651-174E" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="9fad4e77-177d-4a3c-929a-3897e6bc1810"
/dev/sda2: UUID="4a349c2c-0df5-4fdb-a99f-906423554de9" TYPE="ext4" PARTUUID="59097f66-f9fb-4a50-a491-8a71becaa2bd"
root@buster-raspi:~# cat /etc/fstab
# The root file system has fs_passno=1 as per fstab(5) for automatic fsck.
#LABEL=RASPIROOT / ext4 rw 0 1
PARTUUID=59097f66-f9fb-4a50-a491-8a71becaa2bd / ext4 rw 0 1
# All other file systems have fs_passno=2 as per fstab(5) for automatic fsck.
#LABEL=RASPIFIRM /boot/firmware vfat rw 0 2
PARTUUID=9fad4e77-177d-4a3c-929a-3897e6bc1810 /boot/firmware vfat rw 0 2
the /proc filesystem
proc /proc proc defaults 0 0
root@zeus-H370M-DS3H:~# nano /tmp/ssdroot/etc/fstab
I do not think I have missed anything with the UUIDs in them, my Kubuntu machine you see most of the posting from is MBR setup so I cannot mount an efi partition to check there the Pi boots via named files it finds hardwired into the firmware in the first fat partition on a drive. If necessary to re-install grub perhaps this page will help.
install grub after copy ubuntu
Edit: And now it comes to me with the below you can make the PARTUUID identical to your old drive and it should just boot. Plus if needing to get extra space back he explains this too with the partition table manually to get all of it.
https://jamesachambers.com/raspberry-pi-4-usb-boot-config-guide-for-ssd-flash-drives/
All this best done with both drives offline with a booted usb linux stick or dvd.
Edit2: Had time on my hand so looked around some more on the /boot partition there is the file EFI/ubuntu/grub.cfg it has a UUID that needs to be changed to the / one. As well as the /etc/fstab on the new drive / partition. This link below worked perfectly for me to install the grub to my EFI partition on my system that until few hours ago was booting as MBR now as EFI. You may want to give it a try booted from an installer in EFI mode.
root@zeus-H370M-DS3H:/home/zeus# ll /sys/firmware/efi/
config_table esrt/ fw_vendor runtime-map/ vars/
efivars/ fw_platform_size runtime systab
root@zeus-H370M-DS3H:/home/zeus# mount |grep sda
/dev/sda3 on / type ext4 (rw,relatime,errors=remount-ro)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
https://www.debugpoint.com/2016/11/fix-ubuntu-boot-grub2-corrupted/