Just make sure you answer the question. Not belonging can be included, but if your essay is only about that, there is a good chance it won't answer the question.
The question says "A sense of belonging comes from having connection with people and places"
I want to include not belonging but I thought it was off topic as u can see the topic says a sense of belonging
So you could talk about both. You could talk about characters with no connection with places and people, and say how they don't belong. Then you could talk about characters who do have those connections, and how they do belong.