"A study from 2018 found that people formed a “casual” friendship after spending 30 hours together."
Of note, when you click on that "study", it's actually a paper on two studies. The first study's methodology relies on participants using Amazon's Mechanical Turk via survey collection, and these participants "were given $.65 for survey completion". Then, the second study's methodology relies on "a Midwest public university, [where] participants were recruited from public speaking courses. To be eligible, participants had to have enrolled in their first semester of school that fall (i.e., freshman, transfer) and have moved to the city within 2 weeks prior to the start of class." There's no mention of incentives for the second study.
I wish the NYT article talked more about the details of these studies and their possible limitations, for instance, with generalizing. Still, I think this is an interesting question. I wonder if there's meta-analysis research done in this area.