If your project requires Unity, get Unity Hub and configure as "Free personal edition".
When you add a project to Unity Hub, a required Unity Editor version is displayed. Make sure to install the matching version from Unity Hub or download archive.