How to create hotspot without internet connection?

A simple solution is to use create_ap. From their site:

create_ap is a tool that helps you create an open, or encrypted AP at any channel, hide your SSID, disable communication between clients (client isolation), IEEE 802.11n & 802.11ac support, Internet sharing methods: NATed or Bridged or None (no Internet sharing)

For your case you want to create an AP with the linux pc without sharing the internet from your dongle to clients, but can do other Lan stuff, like file sharing.

Your wifi card needs to support creating AP

  1. Install some packages:

    sudo apt install util-linux bash procps hostapd iproute2 iw haveged net-tools dnsmasq iptables
    
  2. Get the create_ap package. From the terminal do

    git clone https://github.com/oblique/create_ap
    cd create_ap
    sudo make install
    
  3. After installation, check the name of your modem and wifi card with ifconfig (deprecated) or:

    iwconfig
    

    the wifi card usually is wlan0 or wlp2s0 and usb modem is eth0. yours might be different

  4. Now start hotspot from your linux without internet:

    sudo create_ap -n wlp2s0 MyAccessPoint
    

You can then connect clients. Your internet would not be shared but you can do samba and other things without internet