No Title Bar button to close window Ubuntu 18.04

Your window-control button layout doesn't look right. Run the following command in Terminal to reset it

gsettings reset org.gnome.desktop.wm.preferences button-layout

This should fix the problem. If it doesn't work, then set a suitable button layout manually. For example run the following command

gsettings set org.gnome.desktop.wm.preferences button-layout :minimize,maximize,close

to get the minimize, maximize, close buttons (in this order) at the right end of the title-bar.

Alternatively to get the close, minimize, maximize buttons (in this order) at the left end of the title-bar, run

gsettings set org.gnome.desktop.wm.preferences button-layout close,minimize,maximize:

and so on.