If you receive a notification message saying that the maximum habitat cap was reached, it means that you have already built all the habitats available for your current level.
So to continue building new habitats, you have to increase your current in-game level.
 
Please note that the quantity of habitats available to you usually corresponds to your current level in the game -1
(i.e. at level 30, you can have up to 29 habitats).
 
Exceptionally, starting from Level 62 onward, the number of habitats available will directly correspond to your in-game level.