I can add that in Russian there is also "огоро́д" (kitchen-garden), it is a space on the ground meant to cultivating vegetables. The difference between "сад" and "огород" is: a "сад" has trees or/ with shrubs These trees and shrubs can are fruit/vegetable- bearing or not. But in "огород" every plant is vegetable-bearing, because people in Russia create "огород" to get their own organic vegetables.
@Amawaku - There is a difference between the two (in both Russian and English) Сад is specifically a space meant for planting and cultivating plants (flowers and fruit/vegetable-bearing plants). It can be within a двор, which is just a yard of any kind - an open space associated with a house or building.
@goetz895855 - Traditionally a двор is a courtyard, an open area surrounded by the walls of a building (or fencing). So even though it's outside and not necessarily covered, it was traditionally enclosed. Even though in modern language it also refers to your good old front/back yard, the original preposition is still used.
Sort of like the opposite of what happened to кухня, which was traditionally an open area which is why it uses на even if you're talking about the room inside of a house :|