Recover the files using a backup you made before attempting to resize the partition. Unless you have another OS installed on the Mac there is no reason to resize anything since macOS does not use partitions for "Macintosh HD" and "Macintosh HD - Data". These are just separate APFS volumes located within a Container which is on a single partition. I'm not sure what you did.
If you don't have a backup, then stop using the computer immediately or you risk overwriting the data you are trying to recover. You can try using data recovery software such as Data Rescue, but you will either need to boot to an external macOS drive or put this Mac into Target Disk Mode to connect it to another Mac.
Your other (best option) is to contact a professional data recovery service such as Drive Savers or OnTrack. Both vendors provide free estimates and both are recommended by Apple.
Always have frequent & regular backups. FYI, it is impossible to recover accidentally deleted data from an SSD after emptying the Trash plus an SSD can fail at any time without any warning signs. With many newer Macs only a professional data recovery service will be able to attempt data recovery if the Mac has any type of hardware failure (no guarantees of success).