Hi @Nirvesh Kumar ,
You can using Copy-DbaLinkedServer. Copy-DbaLinkedServer migrates Linked Servers from one SQL Server to another. Linked Server logins and passwords are migrated as well.
Refer to the blog Scripting Out Linked Servers with Actual Passwords.
We can also script out Linked Server on old server, then run the scripts in new server. But you need to manually key-in the passwords as when you script out linked servers, passwords are not scripted out - they are grabbled - ########. If the local login is not in your new server, you also need to add the login in your new server manually.
If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.