Shell access to the beaglebone black

Thank Robert for your replies

Thanks to your directions and the following topic Help needed to use drivers of Wand-board dual in Ubuntu minimal root file-system
I ran the following and it went just fine

Finally I ran the following:

wget https://raw.githubusercontent.com/RobertCNelson/boot-scripts/master/tools/eMMC/bbb-eMMC-flasher-eewiki-ext4.sh
chmod +x bbb-eMMC-flasher-eewiki-ext4.sh
sudo /bin/bash ./bbb-eMMC-flasher-eewiki-ext4.sh

I shutdown the Beaglebone Black, I removed the sd card and I observed a u-boot error through the usb-serial converter:

U-Boot SPL 2022.04-00037-ge0d31da5 (Feb 22 2023 - 14:02:01 -0800)
Trying to boot from MMC2
mmc_load_image_raw_sector: mmc block read error
spl_register_fat_device: fat register err - -1
spl_load_image_fat: error reading image u-boot.img, err - -1
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

I am not too sure what went wrong for u-boot. I tried to flash the emmc twice but ended up with the same result. Could you please help me out with this issue ?