If you are searching for the migration of public folders from the Exchange On premise server, try out EdbMails Exchange migration tool which gives you an option to perform Public folders from one Exchange server to another Exchange server public folder and also to Office 365 public folder.
You will get the separate guide for Exchange Server 2013 / 2016 / 2019 and also for Exchange Server 2010 separately. You need to select Connect to Export / Backup/ Migrate Public Folder option in the Login Screen.