# assuming iwd is not installed and wpa_supplicant is
systemctl stop wpa_supplicant
apt-get install iwd

Open /etc/iwd/main.conf and enable EnableNetworkConfiguration

systemctl --now enable iwd

From a non-root user enter the iwctl command

device list
# from the list of devices find your wifi device in this case wlan0
 
# scan for networks, no output will be displayed
 
station wlan0 scan
 
# list networks
 
station wlan0 get-networks
 
# connect to your network
 
station wlan0 connect "YOUR NETWORK"
 
# enter passpharse
 
# get connecttion status
station wlan0 show