Learn to use Chainlink VRF and Keeper
https://docs.alchemy.com/docs/5-connect-apis-to-your-smart-contracts-using-chainlink