I have a Google Search Console account right now and submitted this property through the "URL prefix" method. Now I am going to submit it again through the "Domain" method to include the subdomain data too, and I want to know how can I transfer the old property data to a new one? I don't want to lose the data...
You should be able to also add and verify the Domain Property too.
You should also keep the verified prefix url property for linking to Google Analytics, if you are wanting to do that. If you do not delete the prefix url Property in GSC then you won't lose the data.
What do you mean by:
by I want to know how can I transfer the old account data to a new one? I don't want to loose the data...
Do you mean you want to access the old/current account data via a different Google account, or something else?
Google doesn't provide any mechanism to transfer data between search console properties. If you want to be able to see the data from your prefix property, you can just keep that old one around. You'll be able to check the data in the old property and you'll be able to check the data in the new property. There is really no reason to delete the old prefix property.