Groups say the valence number. For example Hydrogen is on group 1, has 1 electron on it's last and only level. So we can know the valence number on that are on the groups 1-2 and 13-18. But how am I supposed to know the valence number on transition metals(3-12)?

PD: You could tell me to use the oxidation number but that is completely wrong since they are not the same.