Yes, that is the correct method for specifying the Node.js version for your project. You can read more about it in the official package.json specification.
Of course, that won’t help you if the version you specify is unavailable at runtime.
Looks like 12.0.0 is still the latest version that Glitch has built in. Nodejs.org now recommends 12.18.3 for most users and 14.9.0 for the latest version. So this is just a request to add those.
Interestingly if you specify a version that Glitch doesn’t have, it says, for example:
Could not find node 14, using 10
node v10.15.3
Probably 12.18.3 is currently what it should be defaulting to, based on Nodejs’s recommendation.