I've been facing the same issue so what I did is the following manual steps because an updated repository for ubuntu doesn't exist anymore and the snap version is also only updated irregular.
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
chmod +x dotnet-install.sh
# you can choose your path here as the last parameter I just kept in my home directory
./dotnet-install.sh --channel 9.0 --install-dir ./dotnet-sdk
Then I created a symbolic link.
sudo ln -s /home/<myuser>/dotnet-sdk/dotnet /usr/bin/dotnet
Before following those steps, you might need to purge all dotnet related apt installation.
sudo apt purge dotnet* --auto-remove