Ban system/device identify

I wanna do a ban system. Can somebody can send me something whats store data after the app get deleted or a way how an device can be to identify an device

It is difficult, these days, to get a real device ID, but you could use this to identify app users and their devices: