Subdivision modifier renders with Viewport Subdivisions in Edit Mode
I am also new to Blender and noticed this recently. I believe it's due to the fact that you cannot apply modifiers (e.g. Subdivision Surface) while in Edit Mode. When you render, it still takes into account whether you're in Object or Edit Mode. So yes I believe you must be in Object mode for the modifier to be applied during the render.