Where did you study constutional law? Rights granted in the constitution are subject to many restrictions. There is no explicit "freedom of association" in the Constitution, although it has been held to be implicit in freedom of speech. Free speech doctrine includes a "time, place, and manner" test that's applied to restrictions on speech when the government has a "significant interest" in the restriction[1] (e.g., national emergency for a viral pandemic). I don't know how the lockdowns (which are mostly not full lockdowns) would fare if Supreme Court were to apply the time, place, manner test, but I wouldn't presume to offer an offhand opinion that they're "probably illegal".
[1] https://en.wikipedia.org/wiki/Freedom_of_speech_in_the_Unite...