Configure external USB WiFi adapter

Hello, I am trying to install the drivers for an external WiFi adapter.
I am installing it in the debain template, but is not working. I choose the debian template because is the template used by sys-net. Which should be the correct steps to follow if I want to connect to internet using an external USB WiFi adapter? Is there any particular hardware recommented?

user@debian-11:~$ sh -c 'wget -O /tmp/install && sh /tmp/install'
Root access is required
Package manager is: apt-get
cat: '/sys/bus/usb/devices/*/idVendor': No such file or directory
cat: '/sys/bus/usb/devices/*/idProduct': No such file or directory
Could not detect the adapter!
Please insert the BrosTrend WiFi adapter into a USB slot
and press [Enter] to continue.
If you don't have the adapter currently, you may type:
  (a) to install the 8812au driver for the old AC1L/AC3L models before 2019, or
  (b) to install the 88x2bu driver for the new AC1L/AC3L version 2 models, or
  (c) to install the 8821cu driver for the AC5L model, or
  (d) to install the 8852bu driver for the AX1L/AX4L models, or
  (q) to quit without installing a driver
Please type your choice, or [Enter] to autodetect: b
Installing prerequisites
Hit:1 stable InRelease
Hit:2 bullseye InRelease                  
Hit:3 bullseye InRelease                     
Hit:4 bullseye-security InRelease
Reading package lists... Done
Downloading the driver
URL: [4127822/4127822] -> "rtl88x2bu-dkms.deb" [1]
Installing and compiling the driver
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'rtl88x2bu-dkms' instead of './rtl88x2bu-dkms.deb'
rtl88x2bu-dkms is already the newest version (5.13.1-20b5).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up rtl88x2bu-dkms (5.13.1-20b5) ...
Removing old rtl88x2bu-5.13.1 DKMS files...

Deleting module version: 5.13.1
completely from the DKMS tree.
Loading new rtl88x2bu-5.13.1 DKMS files...
dpkg: warning: version '6.1.35-1.qubes.fc37.x86_64' has bad syntax: invalid character in revision number
It is likely that 6.1.35-1.qubes.fc37.x86_64 belongs to a chroot's host
Building for 5.10.0-23-amd64, 6.1.35-1.qubes.fc37.x86_64, initramfs, lost+found and vmlinuz
Module build for kernel 5.10.0-23-amd64 was skipped since the
kernel headers for this kernel does not seem to be installed.
Building initial module for 6.1.35-1.qubes.fc37.x86_64
Error! Bad return status for module build on kernel: 6.1.35-1.qubes.fc37.x86_64 (x86_64)
Consult /var/lib/dkms/rtl88x2bu/5.13.1/build/make.log for more information.
dpkg: error processing package rtl88x2bu-dkms (--configure):
 installed rtl88x2bu-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
Aborting, command failed: apt install --yes --no-install-recommends ./rtl88x2bu-dkms.deb

 ERROR: The driver was NOT successfully installed!
1) Please select all the text in this terminal, then right click with the
   mouse and select Copy, and finally paste all the text in an email to:
2) Please attach this autogenerated log file to the email:
3) Some common problems are documented in:

Is this even necessary? It looks like it’s a Realtek device that is probably supported by the kernel if you have the right firmware package installed. Maybe firmware-nonfree or realtek-firmware?