Steps to evaluate where it comes from.
Switch User to see if it is user specific
Restore Disk permissions.
Start in Safe mode to eliminate 3d party applications
It looks like it is a left over from some app that did not close properly, next time if it happens remember what app you just closed.
If problem persists, use Apple Hardware Test.
Answer from Ruskes on Stack ExchangeHome Screen white rectangle removal - Apple Community
macos - Mysteriously, a rectangle has appeared in the middle of the screen. How to get rid of it? - Ask Different
empty rectangle appeared on my desktop an… - Apple Community
How to Remove Rectangles from Word Docs on MacBook Air
Videos
Steps to evaluate where it comes from.
Switch User to see if it is user specific
Restore Disk permissions.
Start in Safe mode to eliminate 3d party applications
It looks like it is a left over from some app that did not close properly, next time if it happens remember what app you just closed.
If problem persists, use Apple Hardware Test.
A floating black rectangle appeared on my Mac screen after upgrade to High Sierra operating system. It is due to an Accessibility option and can be removed as follows:
System Preferences > Accessibility > Zoom > Options > Show preview rectangle when zoomed out
I do not know how it appeared, but I am glad that it is gone.

I had no problem installing both Rectangle and Rectangle Pro together via Homebrew, it installs two different applications into /Applications.
$ brew install --cask rectangle
==> Downloading https://formulae.brew.sh/api/cask.jws.json
==> Downloading https://github.com/rxhanson/Rectangle/releases/download/v0.82/Rectangle0.82.dmg
==> Installing Cask rectangle
==> Moving App 'Rectangle.app' to '/Applications/Rectangle.app'
rectangle was successfully installed!
$ brew install --cask rectangle-pro
==> Downloading https://rectangleapp.com/pro/downloads/Rectangle%20Pro%203.0.30.dmg
==> Installing Cask rectangle-pro
==> Moving App 'Rectangle Pro.app' to '/Applications/Rectangle Pro.app'
rectangle-pro was successfully installed!
$ shasum /Applications/Rectangle.app/Contents/MacOS/Rectangle
f62a0cc8f9dbcd406a8c3adec32898aed3a20dd7 /Applications/Rectangle.app/Contents/MacOS/Rectangle
$ shasum /Applications/Rectangle\ Pro.app/Contents/MacOS/Rectangle\ Pro
f47647bfb9356a0aed344779026d221e66c27637 /Applications/Rectangle Pro.app/Contents/MacOS/Rectangle Pro
Maybe you already installed Rectangle Pro directly from the website? You can run
brew install --adopt rectangle-pro
to make Homebrew aware of this.
You can try this command:
brew reinstall --cask rectangle-pro
(The --cask option directs brew to treat all named arguments as casks.)
The reinstall option uninstalls and then reinstalls a package, as explained in the Homebrew documentation:
Uninstall and then reinstall a formula or cask using the same options it was originally installed with, plus any appended options specific to a formula.
Hi,
So I just bought my first Macbook.. I'm very excited but also super confused. I grew up on Windows and am not sure how to do a lot of things, one of them being "rectangle." I downloaded rectangle in hopes of snapping screens easily. I changed the shortcuts but whenever I use them, nothing happens. The app is open (I think) so I'm not sure what's going on. Can anyone help?
Edit: I got it to work! Thanks everyone. Apparently I just needed to restart my Mac. :)