Hi, @Aryan Khan
Thank you for posting in Microsoft Q&A forum.
First, how do you upgrade your windows 10 from 1607 to 22h2? Are you using SCCM?
Then, what is the error message during the process?
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".