There are ways but no good ways or supported ways. I failed at my attempt to remotely upgrade 11 to 13 and had to climb.
If you had a USB stick in the Pi then you could format it, download an image to it, boot from it, then do the same to the SD card.. That’d be a straight forward way to do it. Any methods that don’t involve a secondary storage medium are pretty intensive and have a high likelihood of failing.