@zezo2021 - Random numbers can repeat very easily. True randomness means there is no selection constraint on the number (though you CAN impose a range constraint).
What is your business need? I.e. tell us what you REALLY want using a description of the BUSINESS rule.