Royal Mail tracking numbers are not considered "live" by Royal Mail until the following day after the shipment has been manifested or collected, depending on the service type.
This means if you create a Royal Mail label at 10:30 AM on Tuesday and the shipment is manifested and collected the same day, the tracking number will be live from Wednesday, usually shortly after midnight. Before that time, you will see an error similar to the below when trying to track the shipment on the Royal Mail website.