Having territories in a state of happiness is as simple as donating to your people. Using this command multiple times in different territories will net you your achievement in no time. Make sure you always defend these territories as well, especially in the shape of retaliating against skirmishes as they greatly reduce the happiness of your people.