Hi, @ramin sa
Thank you for posting in Microsoft Q&A forum.
Yes, you want to migrate the old SCCM to the new hardware, so it's suggested to use backup and restore, you may refer to Jason's blog for the details:
https://home.memftw.com/configmgr-site-backup-restore/
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 "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.