To create a wifi hotspot in ubuntu 18.04, you should be first connected via LAN.
The process is quite simple and can be done via GUI.
Click on the top right buttons and click on the WiFi option. in the dropdown select Wifi-settings.
click on the options button indicated by the green arrow. then click on ‘Turn On Wi-Fi Hotspot’ option.
Click on ‘Turn On’
The Hotspot is now active!!
you can find the password and details.
Now any of your devices can discover this Hotspot and connect to it with the given password.