Via Archive Tarball
Download the linux 64 bit version from https://developer.android.com/studio#downloads
Extract the file. For example, if the downloaded archive is named android-studio-2021.1.1.23-linux.tar.gz, navigate to the desired installation location (e.g., /opt) and run:
tar -xvzf /path/to/archive/android-studio-2021.1.1.23-linux.tar.gz
See the official instructions for more information.
Execute the program:
Upgrading Android Studio when installed from the tarball can be tricky. The official instructions explain how to use the software's internal update functionality, but doing so requires having write access to the installation directory and Android Studio files, which means that either Android Studio must have been installed to an area of the filesystem under the user's control (e.g., under $HOME), or the appropriate directories and files must have been transferred to the user (e.g., via chown). It may be possible to run Android Studio as root in order to allow it to update itself, but this is probably a bad idea with software as large and complex as Android Studio.
Snapcrafters provides an official Snap package for Android Studio:
If you haven't already installed snapd, install it:
sudo apt install snapd
Install the Android Studio Snap:
sudo snap install android-studio --classic
snap run android-studio