Not sure where you can buy a pinion gear that small but you can buy 6t pinion wire from Stock Drive Products:
https://sdp-si.com/eStore/
Go to "Gears" and then "Pinion Wire"
You need to know the pitch and pressure angle. For approximately $15 you can get 1 foot of brass pinion stock that you can cut pinion gears from on a lathe. Obvously you would need a lathe and way to make the hole/keway.
The price adds up quickly because their shipping rates aren't that great and they have a handling fee.