Both "mod" and "pitch" define the size of the gear teeth.
For gears, 0.5 mod tells you that the "module" of the teeth is 0.5mm. Module is calculated by dividing the pitch diameter by the number of teeth. So your 14-tooth 0.5 mod pinion has a pitch diameter of 7mm.
In US units, they use "diametral pitch" instead. Diametral pitch is calculated by dividing the number of teeth by the pitch diameter. Usually reported as "48P" meaning 48 teeth per inch of pitch diameter. So it's inverted from the module definition. A 14T 48P pinion has a pitch diameter of 0.29 inches.
The sizes are really close, but not the same. BTW, pitch diameter is the effective diameter of the gear. It's smaller than the outside diameter you can measure with a caliper.
To get your pinion to mesh properly with the spur gear, you must use the same size teeth. So either match module or match diametral pitch.
Matching the inner hole diameter to the motor shaft size is another concern. But not directly related to teeth size.