I think Microsoft must have made the titlebars larger to make them more easily draggable when using a touch interface, but they just use unnecessary vertical space on a normal desktop or laptop computer, especially if it has a low resolution screen. I also think it looks nicer when it is reduced in size a little.
The following registry .reg file will make the titlebar thinner, the titlebar text smaller, scroll bars thinner and the border padding as thin as possible.
This also works on Windows 10 and 11, but it does not affect WindowsRT/Metro/Modern/UWP/Whatever apps.
Windows Registry Editor Version 5.00
Remember to export the
WindowMetrics key before you start modifying it, just in case you need to revert to the defaults after having messed something up.
You need to log out and back in again to see the changes.