If you used Samsung Cloud or Samsung Smartswitch to move your info across then if your notes were backed up they should have transferred across.
Take a good look in your Samsung Notes again please just to re check.
Press the Hamburger Icon to see this pop out option box.
to look in those.
As you have now factory reset the previous phone this would typically delete your stored information, and takes the phone back to the last successful software update.
If that's the case then it's likely your notes are lost unless you use another Samsung device like a tablet as they might be on there.
I wish you all the best with this.
Edit to add I'm not sure if anything in this link will help as I've not used software like this so cannot endorse them. You could try a Google Search.
Current Phone > Samsung Z Fold³ 5G.
@sam2005: It may have been the case that your Notes were set up to sync with Samsung Cloud in the background, therefore please try heading to the Notes app > Tap the hamburger icon (3 lines in the top left) > Tap the cog symbol in the top right of the pop up window > Import Data From > Samsung Account.