In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful or accepting the risk.
If the browser.tabs.drawInTitlebar preference is currently false, double-click it to flip the value to true
How to remove title bar of Firefox browser
In newer versions of Firefox, right click on the tab bar and choose Customize Toolbar.
Firefox opens the customization menu in a new tab. Move to this new Customize tab and look at the bottom. You’ll see Title Bar option checked.