Mirror works best with Unity 2019 LTS.
Mirror generally works with all newer LTS versions too (i.e. 2020 LTS).
Mirror does not support older Unity LTS versions like 2018 anymore. It's too much work for us, but you could use an older Mirror version.
A lot of people ask us if Mirror is compatible with Unity 2021.0.1.preview or similar.
Unity's LTS versions are barely stable enough. We do not recommend running multiplayer servers with anything that's not LTS.
In fact if you care about stability, sticking with the previous LTS version (2019 LTS) is a good idea.