Hi, @liven stool
Thank you for posting in Microsoft Q&A forum.
It doesn't matter whether the new SCCM and Database server are in the same server, you just need to determine what data should migrate to the new server:
https://learn.microsoft.com/en-us/mem/configmgr/core/migration/determine-whether-to-migrate-data
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Add comment".