Preheat the oven to 350°F (175°C) and line the muffin tin with 12 paper cupcake liners.
In a medium bowl whisk together the flour, granulated sugar, baking powder, baking soda, and salt until well combined.
In a large bowl beat the softened butter with an electric mixer until creamy and smooth, about 1 minute.
Add the eggs and vanilla extract to the butter and beat until the mixture is light and slightly fluffy, about 2 minutes.
In a small bowl whisk together the milk and sour cream until smooth.
Add half of the dry ingredients to the butter mixture and mix on low just until combined.
Pour in the milk–sour cream mixture and mix on low until incorporated.
Add the remaining dry ingredients and mix on low until just combined, then finish folding with a spatula to avoid overmixing.
Divide the batter evenly among the 12 liners, filling each about two-thirds full.
Bake the cupcakes for 16–18 minutes or until a toothpick inserted in the center comes out clean.
Remove the cupcakes from the oven and let them cool in the pan for 5 minutes.
Transfer the cupcakes to a wire rack and cool completely for at least 40 minutes before decorating.
While the cupcakes cool, make the frosting by beating the softened butter in a large bowl until pale and fluffy, about 2–3 minutes.
Gradually add the powdered sugar, about 1 cup at a time, mixing on low after each addition until combined.
Add the salt, vanilla extract, and 2 tablespoons of cream or milk, then beat on medium-high for 2–3 minutes until light and fluffy, adding more cream if needed for a pipeable consistency.
Divide about one-third of the frosting into a separate bowl and color it yellow with gel food coloring, mixing until evenly tinted.
Color the remaining two-thirds of the frosting green with gel food coloring, adjusting the shade until it resembles bright John Deere green.
Fit one piping bag with a large round tip and fill it with the yellow frosting.
Fit the second piping bag with a grass tip or small star tip and fill it with the green frosting.
If using, sprinkle the tops of the cooled cupcakes lightly with crushed chocolate cookies or chocolate sprinkles to create a “dirt” base.
Pipe a yellow circle or “field” shape in the center or one side of each cupcake, leaving room around it for green “grass.”
Pipe green grass or star swirls around the yellow area to resemble a grassy field surrounding a farm.
Gently press a miniature tractor into the center of the yellow area of each cupcake so it looks like it is driving across the field.
Adjust any frosting around the tractor with a small offset spatula to secure it and tidy the design.