Threejs has had many breaking changes in the last several versions, especially if you were using typescript, the older geometry base class and importing jsm libs directly.
Go back to the section
Begin Creating the Three.js Project - Three.js Tutorials (sbcode.net)
Do the 5 videos from there. It now uses the webpack bundler and I show you all the steps you need to get it working. It will only take you half an hour and it will make sense. The latest threejs works best when using a bundler.
Also, for problems concerning my course, its better to use the communications tools you get with the particular course suppliers platform. Use discourse.threejs.org for more generic threejs questions.
Also I don’t recognise the code that you pasted.