You can't actually resize an SD card.
Also, I fear there is a more hassle-free way of expanding your filesystem and partition to make use of the entire available space on the SD card when using RaspberryPi OS.
I'd recommend to use
sudo raspi-config
Advanced Options | Expand Filesystem.
EDIT: It doesn't require 15 manual steps, and it's also faster, just requring a reboot.