i think you need to get all sales joined with products (to get the name), grouped by product.id and you need to have a group count as total_sale, then you order by this one desc.
Something like:
Sales::select(\DB::raw('COUNT(sales.id) as total_sales, products.name'))
->with('product')
->orderBy(\DB::raw('COUNT(sales.id)', 'desc')
->groupBy('product.id)
->get();