Carrying capacity is dictated by energy availability. Once we get fusion working even 100 billion people wouldn’t be unreasonable provided waste management works and the whole planet isn’t turned into a landfill. (Assumption here is highly efficient indoor agriculture, instead of the current system)