Removing dark borders from UI elements, including windows and buttons

Solution 1:

You have turned on ‘Increase contrast’ in settings.

Open System Preferences, search for ‘contrast’ and unselect ‘Increase contrast’: