How to install Yarn on Ubuntu 22.04 LTS

To install Yarn on Ubuntu 22.04 LTS, import its GPG key, then enable the Yarn repository on Ubuntu 22.04 system and execute “$ sudo apt install yarn” command.