As the error says,
OS.set_window_maximized() takes one argument. Opening the editor help (click Search Help in the top-right corner of the script editor) tells you that the argument is a boolean:
So, you should be using
OS.set_window_maximized(true) to maximize the game window. Since this function doesn't return anything, there is no point in assigning its result to a variable.
Moreover, you should not be calling window management functions every frame (which can result in performance decreases); it's better to call them just once when needed.