(red) white. How did it got my territory
At this point, the computer or scoring mechanism probably thinks that the group in that corner will be able to get two eyes and live. If it lives, it is no longer you territory, but they can have territory in it. If you then kill those 5 pieces, the scoring mechanism will know that it is your territory because the opponent in there would be dead. As I am a 16k right now, and I am not the greatest at looking ahead, I would play 4,13, the spot right above where your opponent just played in order to kill that group. This may be wrong, so if someone better than me says something differently, listen to them and just ignore this comment.
Hello Sokratis Spyrou and welcome to the forums.
I am not sure how far you got in the basic concepts of Go, but if you have not already hear about what makes a group alive, you might want to read something about that (https://www.learn-go.net/lessons/06/) it might make things more clear.
To try and put it in general terms: Counting territory only really matters when the game is over. Any attempts before that (before all borders are clearly defined and both players pass) are only estimates and may not reflect the actual result. We can never safely predict what moves the players will play exactly and what mistakes will be made. If you manage to kill the invasion in the upper left, I am sure the app will correct the prediction and mark the corner as yours. If you do not manage to kill it, well then it will be White who is surrounding the corner territory NOT Black - the game is not over yet.
And to make matters even more complicated for you (sorry, but I cannot resist) I can tell you that the bottom part MAY also become Black’s territory if played correctly
Yes, life and death is a very important topic in Go. The most important actually, because we only score living groups. So, if you manage to kill those two small white groups (and you can, definitely) that will be your territory, not white 's.
There are exercises that can be done to learn and improve that ability (to recognize if a group is dead or alive and to choose a key move that saves or kills a group). They are called “puzzles” or “tsumego” using a Japanese word.
You can find many of them here on OGS, but my suggestion is to start with a very nice site called “Black to play”.
At first you may want to see the solutions in order to understand how they work. Then you can try to solve them by yourself. If you solve them, more difficult problems will be presented to you and you’ll become addicted as we all are.
Since you use the “Go free” app (which I definitely recommend for beginners) you can also try to take few moves back and do some trials to find a better answer to white’s invasion.
Invasions are very common in go and we all must learn how to deal with them.