Alternatively you should just be able to edit the file /etc/apt/sources.list.d/nodesource.list
and change all the 12.x in there to 14.x then run
sudo apt update
sudo apt full-upgrade
which should upgrade nodejs to 14.x as well as upgrading anything else in the system that needs upgrading.
Once you have upgraded nodejs either by this method or the post above then run the install script again as you need to re-install node-red and rebuild any nodes already configured. The script will not downgrade nodejs.