This is an extension for Gnome 3.38 which puts minimize and close buttons in the top panel.
You can install it through the GNOME extension webpage (link on the github info) or manually like this:
git clone https://github.com/PWall2222/WB.git
cd WB
mkdir -p ~/.local/share/gnome-shell/extensions
cp [email protected] ~/.local/share/gnome-shell/extensions/
gnome-extensions enable [email protected]
I took inspiration and the css/icons from danielkza extension.