There are two major causes of nutrient loss during cooking:
- Nutrients dissolving in liquid, when the liquid is then discarded.
- Destruction of nutrients based on heat.
The first is not related to the cooking method directly, but rather to factors like time in and temperature in contact with the liquid.
The second is related to the temperature which the food obtains.
Neither steaming nor roasting have a lot of liquid in contact with the target food, so that modality is essentially out of play.
Roasting can conceivably achieve higher temperatures than steaming, which may in some cases result in higher nutrient loss. In other cases, it would result in higher availability of nutrients.
There is no simple way to answer a question like "what is the best way to cook foods to retain nutrition." It depends on the specific food, and how you treat it, and which nutrients you are interested in.