I have done a similar import recently. In my case i had a SQLite db.
I built off some of the scripts there to satisfying my own requirements. There are some good guides on how to run import scripts on this forum. When users rejoined they had to use the “forgot my password” with their original email account to regain access.
Maybe there is an easier way to just import user accounts specifically but I can only speak to my own experience