Snap cannot connect snap server

I was able to install telegram as

sudo apt install snapd qubes-snapd-helper

to get it into the template VM, but when I enter

sudo snap install core
I get an error like below and cannot install it.
Should I put a proxy in between so that I can communicate with this one?

user@debian-12-xfce:~$ sudo snap install telegram

error: cannot install “telegram”: persistent network error: Post
https://api.snapcraft.io/v2/snaps/refresh”: dial tcp: lookup
api.snapcraft.io on 10.139.1.2:53: dial udp 10.139.1.2:53: connect:
network is unreachable
user@debian-12-xfce:~$

You need to install the snap in the app qube:

Or like this if you want to install it in template: