Linux Capable has published a tutorial showing you how to install Nginx mainline on Debian GNU/Linux 11 or 10 LTS.
How to Install Nginx Mainline on Debian 11 or 10
Learn how to install the latest version of Nginx mainline on Debian 11 or 10 using APT package manager with official Nginx repository.
How to Install Nginx Mainline on Debian 11 or 10 - LinuxCapable