Based on the provided code, it seems like the first option of using a subquery and summing the collection would be more efficient. This is because it involves only one query to the database, whereas the second option involves three separate queries.
However, to be sure, it would be best to test both options with a large amount of data and measure the performance.
Here is an updated version of the first example code with some minor improvements:
$valuationGroupBidsAccepted = ValuationGroup::with(['bids' => function ($query) use ($user) {
$query->where('status', '>', 2)
->where('user_uuid', $user->uuid);
}])
->withSum('valuations', 'area')
->withSum('bids', 'value')
->get();
$acceptedBidsValueSum = $valuationGroupBidsAccepted->sum('bids_sum_value');
$acceptedBidsAreaSum = $valuationGroupBidsAccepted->sum('valuations_sum_area');
Note that I've used the with method to eager load the bids relationship, which should improve performance. I've also simplified the sum calls by passing the column name directly instead of using a closure.