Noob help copying SD Card to M.2 attached via USB

Following an SD Card failure on my RPi4 I have purchased a case with a built in M.2 slot and installed a SATA M.2 card. However, I now need to copy the SD Card image to the M.2 USB drive. I have zero experience with docker and Hass OS. How do I copy the sd card to M.2 card? Can I do it through Hass OS, or do I need to take both storage devices out and connect to a computer?

All I have ever done is flash a fresh copy of home assistant to the new drive and do a restore of the configs. Done in a few minutes. In fact I use the add on Home Assistant Google Drive Backup so my configs are all in my google drive so I install the add on and do a restore.

All sorted now, thanks.