A query builder groupBy is not appropriate here, you need to fetch all of the items and use the Collection groupBy:
$latest = Site::query()
->with('upvotes')
->where([
['is_approved', '=', 2],
['is_featured', '=', 1],
])->orderBy('created_at', 'DESC')
->get();
// $latest is a Collection
$latest->groupBy(function ($item) {
return $item->created_at->toDateString();
});