Create a wifi hotspot like this:
sudo nmcli connection add con-name <NAME> type wifi ifname <INTERFACE> wifi.mode ap wifi.ssid <SSID> wifi-sec.key-mgmt wpa-psk wifi-sec.psk <PASSWORD> ipv4.method shared
That is a minimal configuration which should work on all Raspberry Pi devices from v3 upwards. Problem with this configuration is, that it only provides weak WPA encryption/security.
To remedy this you can switch on some additonal security features:
sudo nmcli connection modify wifi-sec.proto rsn wifi-sec.pairwise ccmp wifi-sec.group ccmp