Recover formatted partition from Ubuntu [duplicate]

The simplest tool for this is Photorec.

I suggest you follow this guide.

https://www.tecmint.com/photorec-recover-deleted-lost-files-in-linux/