Es waren kaum Leute auf der Straße, dafür rasten die Autos ganz nah an uns vorbei.
DeepL translates it as:
There were hardly any people on the street, but the cars sped past us very close.
Google, too, has about the same translation. But I haven't ever seen dafür used as an alternative to 'but'.