i accidently fomatted my storage card. Can i undo it?

Unfortunately, once a storage device has been formatted, the data on it is typically erased and cannot be easily undone. However, you can potentially recover your formatted data from your card using a recovery tool Try Rescuepro from Sandisk to recover your data. It can somehow potentially recover your data but there are chances of data corruption as well.
You can try some more powerful recovery tools like Stellar or Wondershare to avoid the chances of data corruption after the recovery.