First, follow the guidelines in this document. In particular make sure Find My is disabled. If it isn't, you will absolutely have to have the ID that was used to set it up in order to be able to remove it.
What to do before you sell, give away, or trade in your iPhone, iPad, or iPod touch - Apple Support
Assuming all is fine after erasing the device, your best bet is to not make a new account but sign in with your existing account. Only that way will everything from your existing account appear on the device relatively effortlessly.
If you absolutely must make a new account then it will be a lot of work to transfer items from your old account and some can never be transferred.
Set up your iPhone, iPad, or iPod touch - Apple Support
Apr. 2018 post by ASC helper Winston Churchill on transferring data from one Apple ID to another. https://discussions.apple.com/message/33333380#message33333380
Feb. 2021 tips from Eric Root https://discussions.apple.com/thread/252468781?answerId=254653802022#254653802022
Look into using Family Sharing to continue to be able to use items purchased with one Apple ID with other Apple IDs.
Family Sharing - https://support.apple.com/HT201060
Set up Family Sharing - https://support.apple.com/HT201088