Okay, I found the next step ... I can enable and disable the wifi connection to my smartphone hotspot.
I configured the file /etc/NetworkManager/system-connections/WifiSTA.nmconnection
with the ssid and the password for my smartphone hotspot. And then I tried the commands for activating and deactivating the wlan0 network.
root@moodlebox:/etc/NetworkManager/system-connections# sudo nmcli device up wlan0
Device 'wlan0' successfully activated with 'c530dfb4-d269-4397-825b-461a6d5314b7'.
root@moodlebox:/etc/NetworkManager/system-connections# sudo nmcli device down wlan0
Device 'wlan0' successfully disconnected.
root@moodlebox:/etc/NetworkManager/system-connections#
Yes, I could see on my smartphone that the hotspot was used by a connected device. The icon was switched on and off. The ifconfig command has shown the ip address for wlan0 while the connection was on. But I could not get a ping answer from any server and I could get no external web page in the browser.
Ralf