Window size and window position are in priority controlled by the application itself. Some applications remember their window size, others start with a default. Some applications remember the window position, others not. Then, the window manager decides on the position.
Ubuntu, that by default uses Gnome Shell, uses "mutter" as the window manager. The default placement of windows is controlled by the "Smart" algorithm. That algorithm will tend to place windows in the left corner, and else on another place of the window that is free. If no free space is available, new windows will be placed in a cascading order starting from the left top.
You can change the default placement of "smart" to "center" using Gnome Tweaks. Head to the "Windows" tab to activate the setting. That way, new windows will be created in the center of the screen, unless the application itself overrides it.
If you also want control about the position of the window, do not hesitate to use the "Put windows" extension. This is one way to have control. Another way is to use the venerable tools "devilspie" and "devilspie2", daemons that watch the creation of new windows and size and place them according to your rules.