You can do that, but alot of things can go wrong. :)
Its always better to migrate them:
If you wanted to remove the 2010 PFs completely, I would follow this article:
https://blog.rmilne.ca/2020/09/30/unable-to-remove-exchange-2010-public-folder-database/
Then create new one PF mailboxes per:
https://learn.microsoft.com/en-us/exchange/collaboration/public-folders/create-public-folder-mailboxes?view=exchserver-2019
Can I make a recommendation? If they are small and have little information, save the contents to a pst or copy them to a shared mailbox instead, then remove the 2010 servers following: https://blog.rmilne.ca/2020/09/30/unable-to-remove-exchange-2010-public-folder-database/
Then use shared mailboxes instead to replace them. Public Folders are a pain and if you can not use them, I would recommend it!