Need to make my program send random OTPs to my phone number

Do you mean that the random number sequence repeats every time you start up? That is because it is not truly random, it uses a pseudo random number algorithm.