I can’t work out which is the bigger culprit; carbs or salt.
Water weight is mostly glycogen. For that you need water and sugar. Keep in mind, low carb doesn’t mean no carb. Also no dietary carbs don’t mean no carbs since your body makes sugar via gluconeogenesis. Now, there are many factors that facilitate glycogen stores, salt and dietary carbs are just two variables, and you can definetly gain water weight without a lot of salt and carb consumption.
I would say carbs will make you gain more weight.
The kidneys are very good at making sure your serum sodium is at a functional equilibrium. Eating too much glucose will cause more water retention because excess glucose leads to fat storage.. there’s lots of water in fat cells.