I would in most cases recommend sticking to a single gain setting for each instrument/voice during tracking. Technically speaking, there is a benefit to increasing the gain when recording a quiet passage: unused headroom means you're wasting SNR, but if you have good preamps and ADCs in your interface (and use ≥24 bit!) then their SNR should anyways be more than enough for almost all recordings. Manually changing the gain is easy to get wrong – you may end up clipping the input at an unexpected louder note, which is much worse than a bit more than optimal preamp noise. And even if you get it essentially right, it may be non-obvious from the track where you changed the gain. But such manual “step”-changes can end up standing out surprisingly jarring in the final mix, and you need to go back and figure out where exactly the change happened and how to “undo” it.
The proper way to reduce excessive dynamic range is to do it smoothly. This can be done pretty well with volume automation in any modern DAW, but even better and much simpler with an ordinary compressor plugin. A compressor can do more than just bringing out a whispered passage over a loud mix, it can also bring out single syllables that would get swallowed between e.g. loud plosives. Doing that with automation would be hard, and with manual gain it's basically impossible.
Many engineers prefer having an analogue hardware compressor before the audio interface. This is like having the compressor automate the gain instead of volume. Thus is has in principle the advantage of better SNR. (Or to put it another way, compressing in digital effectively decimates the ADC's SNR, and a hardware compressor in the input circumvents this.) But frankly, I don't think this advantage is objectively measurable nowadays. When I set up such a compressor, I do it mostly for the singer's monitor signal: many singers prefer having a compressor there; it allows them to sing more dynamical in the first place because they'll hear themselves well even when singing quietly. And, because it's always easy to reduce dynamic range after the fact but less so to increase it, you should always encourage as much dynamics as possible in a studio performance.
(Good singers are able to do that by themselves though, by changing the distance to the microphone according to dynamic level. Whether that's better than a compressor is a matter of taste.)
As for how much dynamic range the vocal track should have in the final mix – that really depends heavily on the musical setting. In a metal or pop mix, you'll usually need to compress the vocals pretty heavily, in classical, Folk or Jazz much less. Apply as much compression as needed for the vocals to sit nicely in the mix, no more. Don't worry about absolute numbers, that should be only the mastering engineer's concern if at all.