As the support for SharePoint 2010 is ending, we are in a need to migrate custom farm solution (.wsp) from SP 2010 to SP 2016 or 2019. Can anyone let me know the things we need to consider before making such a change?
You should update the farm solutions to support 2013 with v14.5 and v15 modes. This will help transition the sites from a v14.5 (SharePoint 2010) to v15 (SharePoint 2013+).
Farm solutions of SharePoint 2013 support using in SharePoint 2016, in many cases you will not have to make any changes to your farm solution.