Tap one of the arrow keys to toggle the plane SU draws the rectangle, if it is normal to an axis.
Up - normal to blue
Right - normal to red
Left - normal to green
If not ‘on axis’, then try:
Down - parallel or normal to a line you have hovered over, or the edge of the face you hover over (only in the last few versions of SU). Otherwise, Shift did much the same in older versions.
Hold Shift key down to constrain movement - either on an axis, or along a selected edge or face.
When trying to punch an opening in a wall with thickness, make sure you are in the same context as the face(s) of the wall (if it’s a group or component, which it should be, open it for editing) then hold down Shift once you have an ‘On face’ inference showing (a bluish purple diamond and a tooltip ‘On face’ showing) to ensure you are in the plane of the face.
See learn.sketchup.com and follow the Fundamentals of Sketchup series if you aren’t clear about some of the basic techniques of drawing in SU. Or turn on the Instructor window (Window/Instructor) and follow the help there.
Mostly, it’s better to use Components rather than Groups. You MUST learn to use one or the other to stop geometry sticking together.
Assigning Tags (formerly Layers) ONLY controls visibility, and with rare exceptions, leave the default Tag as Untagged (or in older versions, the Layer as Layer0). Draw all geometry with the tag Untagged/Layer0, and assign tags or layers only to groups or components, or non-geometric objects like dimensions or text.
If you have a group or component with some of its geometry inside the object, and some outside, select the geometry that’s outside and copy it to the clipboard, open the object for editing, then Edit/Paste in place to put it inside. I find it’s well worth while making a shortcut for Paste in place (I use Ctrl+V on Mac, or you could perhaps use Alt+V on Windows, or Ctrl+Shift+V?).