how to decide the appropriate resolution when recording my screen for uploading online?
Recording full screen, if your hardware allows you to do it smoothly, is your best option. You can always crop or mask out unwanted areas later in editing. You won't have that freedom if you crop the input at the time of recording. An exception to this rule of thumb can be made if you're absolutely sure that the area of interest is a portion of the screen at an unchanging location.

As long as different recordings are made at the same aspect ratio i.e. ratio of width to height, they may be edited together without creating an obvious mismatch e.g. if you record one video at 1280x720 and the second at 960x540, then since they're both in the ratio of 16:9, you can switch between them seamlessly. But if you record the second at 720x540, then there will be black space to the sides ("pillarboxing") when you switch to the second video in the editor. There's nothing particularly wrong about this, just a matter of style. To avoid pillarboxing in such cases, you will have to crop and zoom in on the second video so that you display a 720x405 portion of it. But that way, you may cut out something you needed to show.

Ideally, you should record at the highest resolution at which you can capture smoothly i.e. without dropping too many frames.