Of course I don't want to implement a cloud backup here.
Why not?
What is the best way to locally and securely backup the data of passwords only so that upon reinstalling the app and logging back in the data since backed up , it won't be lost.
Cloud backup.
There is no such a thing as being able for an app to store stuff indefinitely in some sort of global space. And this is a good thing. As a user, when you uninstall an app, you want your space to be freed. You definitively don't want it to clandestinely store who knows what in your device. We had it a few decades in Windows. It's not pretty.
If you handle data that is important for your users, would it be their passwords or the current level in a video game, store or in cloud.
As, yes, things happen: apps get uninstalled and devices get lost, stolen or broken. And when somebody gets his smartphone stolen, the last thing he needs is an additional headache about all his passwords being definitively lost.