I am trying to build a Warlock and see how I can optimize the hex spell and this question came up: will the disadvantage from the hex spell apply to the next concentration spell when I cast it? Or will it go away as soon as I cast the next concentration spell?
In the case of Hex
PHB page 251
You place a curse on a creature that you can see within range. Until the spell ends, you deal an extra 1d6 necrotic damage to the target whenever you hit it with an attack. Also, choose one ability when you cast the spell. The target has disadvantage on ability checks made with the chosen ability.
There are three types of rolls in the game: Ability checks, saving throws and attack rolls. You seem to think that the Hex disadvantage applies to saving throws which is not the case. There will be no disadvantage on saving throws due to Hex on subsequent spell effects.
When does concentration end?
If we ignore the oversight on the Hex spell, your question asks about when exactly concentration is lost, or rather: does the second spell take effect before the first one ends. Refer to the following text from rules on concentration:
PHB page 203
You lose concentration on a spell if you cast another spell that requires concentration. You can't concentrate on two spells at once.
The last sentence makes it very clear that as soon as you cast the second concentration spell, the first one ends. The rules do not allow you to have two concentration spells in effect at the same time. Thus, the effect of the first spell cannot affect the second spell. In other words: The first spell ends before the second spell takes effect!
You would lose it when you cast the new spell, which is before the effects of the new spell apply. But it really doesn't matter, because Hex only applies to ability checks, and saving throws aren't ability checks. I'm not aware of any spell that causes the target to make an ability check.