To upgrade Pycharm to the latest version, you need to run the following two commands on the terminal:
sudo snap refreshsudo snap refresh pycharm-community
sudo snap refresh
sudo snap refresh pycharm-community