Oh ok then. So larger HQ unit with higher level commander means smaller units underneath then with HQ at every level? Or do i onl need one HQ for the entire thing overall?
Every formation that will have a commander should have a HQ element, otherwise it will not receive any bonus from a commander. For "combat" formations the HQ capacity should be equal to the formation size, otherwise the commander will suffer a penalty and not give their full bonus. For "superior" formations which will command other formations the HQ capacity should be equal to the size of its own formation plus the formations you expect it to command. For example, if your combat formations are 5,000-ton battalions, a superior brigade formation which is also 5,000 tons and expects to command three battalions would need a HQ that has 20,000 capacity. Note that if you then had a 10,000-ton corps formation which expects to command three brigades, it must have HQ capacity for itself plus the sum of all formations under its command, down through multiple levels, in this case 70,000 tons as each brigade commands 20,000 tons.
As the cost to develop an HQ element increases massively as the command capacity increases, I don't recommend having more than 2-3 levels in your hierarchy to begin, and I suggest having your basic combat formation (battalion, etc.) be 5,000 tons or larger, as this is the size of the largest troop transport module and thus makes it easy to ensure your formations can be transported. Many people like to use 1,000-ton companies as their base unit, however this tends to give you too many formations for the amount of commanders you have until quite late in the game and causes a lot of micromanagement, so I don't recommend this unless you are dedicated to a particular RP scheme.
Each unit should have its own HQ. You should also remember to create the HQs as non-combat units and finally add 2 of them per formation for redundancy, just in case one gets killed in action.
The two HQs thing was partially disproven elsewhere in the forums in that the redundancy does not improve the commanders' odds of surviving if one of the HQs is destroyed, basically the commander is "on" one of the two HQs and if it is destroyed the commander dies. However, having two HQ elements does allow you to appoint a replacement commander in the middle of a battle, which is a bit gamey but a viable use case.