Any 2 goldfish can mate. The trick is knowing if you have a male and a female.
Also, goldfish are generally pretty big before they spawn and they need a LOT of room to do it.
Do you have a pond?
If not you're going to need at least 60 gallons for them, and 100 is better. Most people without room for a pond use stock tanks in their basement.
You get your best results by spawning them in a small school, 2 males and 3 females. The males will chase and body slam the females and they quickly release small bursts of eggs and sperm when they hit the sides/shallows/plants.