You can tell when a babies diaper is too small by checking for red marks around the babies waist or thighs which means that the diaper is too tight or is too small to fit the baby comfortably.
Another way to tell if the babies diaper is too small is to see if you can fit two fingers between the diaper waistband and if not the diaper is either too tight or too small.
Or if you cannot get the Velcro straps of the diaper onto the diaper to secure it properly without stretching them too far then the diaper is too small and you should buy a bigger size diaper.
A diaper that is too small may also not hold the amount of urine that the baby outputs so the baby may leak out of their diapers when they pee.
If in doubt buy a bigger size diaper and the bigger diaper will fit better and will also absorb more pee from the baby