$count = User::whereRaw('DATE(created_at) =? ', '2022-05-16')->count();
or
$count = User::whereDate('created_at', '=', date($date))->count();
$count = User::whereRaw('DATE(created_at) =? ', '2022-05-16')->count();
or
$count = User::whereDate('created_at', '=', date($date))->count();