It needs to deploy hybrid connectivity between Lync server and Skype for Business Online first. Then plan to move your user to Microsoft 365 or Office 365.
For more information about upgrading from a Skype for Business on-premises deployment to Teams , please refer to this article.
If the response is helpful, please click "Accept Answer" and upvote it.
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.