What is the inner rectangle called where the goal mouth is and the goal keeper there if a surge is happening?
It’s called the goal box. The purpose of the goal box is to limit the area from which a player can put the ball back into play after an opponent last touched the ball prior to it completely crossing the byline.
It serves no other purpose.