The transition metals have valence and penultimate shell incompletely filled . so does this mean that the transition metals first fill up their valence shell and then penultimate shell?
The short answer to your question is, usually, but not always. The energy differences between these levels are very small, so sometimes other factors come into play that can cause exceptions. Here are a few exceptions:
Predicted configuration Actual configuration
Cr [Ar] 3d4 4s2 ........... [Ar] 3d5 4s1
Cu [Ar] 3d9 4s2 ........... [Ar] 3d10 4s1
Ag [Kr] 4d9 5s2 ........... [Kr] 4d10 5s1
Au [Xe] 4f14 5d9 6s2 .. [Xe] 4f14 5d10 6s1
There is a special stability associated with a full shell, in fact that's probably why you suspected that "transition metals first fill up their valence shell and then penultimate shell." There also appears to be a stability advantage associated with a half-filled shell and this can explain many of the anomalies. The reason that a half-filled shell may have some extra stability is that there are no paired electrons (Hund's rule) in such a configuration.