If you see a gray square is always displayed on the display on the Samsung Galaxy S5, then this is the so-called Assistant menu. The Assistant menu on the Samsung Galaxy S5 consists of a gray square, which is displayed on the home screen, the menu and also within apps. If you tap the square, then one obtains different options to choose from. These are for example the Quick settings, Screenshot and many more.
Thus it should be possible to speed up access to crucial functions without having to press a key combination or have to look into submenus on the settings. Therefore, the Assistant menu can be activated or deactivated in the sub-menu of the Android operating system on the Samsung Galaxy S5:
Menu --> Settings --> Input Help --> Skill and Interaction --> Assistant menu
This menu which is displayed as a gray square on the screen can now be enabled or disabled on the top right with the slider.
You know now where the gray square on the screen of your Samsung Galaxy S5 comes from and how to disable it again.