I had exactly the same error but it was on debian 12, I am not on my PC at this moment but I remember creating a thread and I was able to solve the issue with the help of the community. You can follow
made by vv181. I was able to fix the issue by following his guide. I am quoting that post for you;
error: externally-managed-environment
Make sure you remove the APT installation beforehand.
sudo apt remove electrum
Then, a dirty fix since you have installed the app from the repository, delete a file.
sudo rm /usr/lib/python3.11/EXTERNALLY-MANAGED
As addressed in the reference you have linked in the above post, that particular file (and the warning) exists to prevent Python-related library mismatches. It's not an ideal way, but I believe it should be safe for your current usage.
After you delete it, continue with the installation command.
python3 -m pip install --user Electrum-4.4.6.tar.gz
Also, if you want the application listed on the menu/desktop. Do the following as suggested by Electrum.
Install a related application for the purpose.
sudo apt install desktop-file-utils
Run this command to make it available in your menu.
sudo desktop-file-install ~/.local/share/applications/electrum.desktop
If that does not help, check the other posts made by other forum members in the same thread.
Good luck.