I guess you can change it to first instead, limit still returns a collection for you.
return $this->belongsToMany(Customer::class, 'customer_number', 'number_id', 'customer_id')
->wherePivot('valid_from', '<=', Carbon::now())
->wherePivot('valid_till', '>', Carbon::now())
->first();
However keep in my mind that the many-to-many pattern is based on multiple items. Like a post can have multiple tags and it would weird to always return one tag instead of all the tags.