I'm writing a text where the object of the text is the sprinkle on top of the cupcake, "cupcake sprinkle". But I've searched it and it all turns up "sprinkle cupcakes".
You have to use quotes if you want to impose a specific order on a Google search.
"Cupcake sprinkle" returns more than 20000 results.
Sprinkle can be used both as a noun (to designate the candies you put on top of cakes) and as a verb (to designate the act of sprinkling the candies).
EDIT: as psmears points out the plural form sprinkles is more commonly used.
If you're talking about the little sugary tidbits that are commonly sprinkled over cakes, ice cream and so on, then that's usually called sprinkles (or hundreds and thousands or a few other names).
If you want to refer to this sort of confectionery, specifically intended for cupcakes, then you can say cupcake sprinkles. But you might not need to, because the word sprinkles already has that connotation.