They depend on people actually willing to pay to support them. Both through donations and admissions.
But the fact is that most museums rely, in least in part, on grants and benefactors in addition to visitors.
I was there right before the pandemic and there were a decent number of visitors (given that it was a weekday afternoon).