Gears, whether of the same size or different diameters, will only Mesh together if the size of the teeth are the same.
The size of Gear Teeth is measured along the circumference of an imaginery Pitch Circle but is more easily calculated by dividing the diameter of the Pitch Circle by the number of gear teeth.
The Gear Teeth size is known as the Modulus or Module(m) and it must be the same for any meshing gears.
Always check this before purchase - contact supplier if not stated.