Wifi connection via system

Edit /etc/network/interfaces file like adding lines

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-psk wifi-password-here
wpa-ssid wifi-ssid-here

PS. Use the right interface, which command ifconfig tells. An example

allow-hotplug wlo1
iface wlo1 inet dhcp
wpa-psk blablablaa
wpa-ssid myownwifi

Restart or run

sudo /etc/init.d/networking restart