If you resize the window you should resize the viewport aka glViewport() to fit the new screen size.
Regards the orthographic projection, this depends on the game you are working on.
In a pong clone you may want a fixed orthographic projection which never change - this will automatically scale up/down based on the viewport.
If you also want to preserve the aspect ratio you need to calculate the offsets and sizes yourself and pass this to the glviewport (Letterbox Aspect Ratio).
In some other games, you may update your orthographic projection to fit the window size, but these would require you just have to scale your game entirely yourself.
Modern games use mostly a perspective matrix and setup a camera to fit the level portion in, even in a 2D scenario because you dont have to deal with aspect ratio / stretching at all.