Join their graduate-level research seminar (or graduate level discussion paper class).
This is the easiest way to really get to know a professor. And graduate-level seminar courses are a lot different from most undergrad courses - in fact - it is quite possible for an undergrad to gain a lot from them even if they don’t have as many prereqs as most people (this is true for most subjects - but there may be exceptions for theoretical math/physics). There’s usually far more class discussion (where the professor can get to really know you), and my experience is that many professors generally enjoy teaching research seminars a lot more than teaching traditional classes.
Also, joining their seminar classes is also a very good (and low-anxiety) way to learn about whether or not you might like to do research for them (and the other way around, too). Seminar classes often tend to attract other professors too, so you can get a chance to know multiple professors.
Interact with professors who use online social media (or other environments where the interaction is in a public sphere, and where there aren’t too many other people)