laravel 8 relationship with nested query not working

Why when using an internal query for relationships it doesn’t work like this.

 Customer::where('contract_id',$request->contract_id)->with(
      [
          'claims'=> function ($q){
                $q->select('id');
            }
      ])->get();

, when you cancel the function, it works internally

 Customer::where('contract_id',$request->contract_id)->with( ['claims'])->get();