you can convert the new Date() to UTC using the toISOString() method
const lastTimeFocused = new Date();
const lastTimeFocusedUTC = lastTimeFocused.toISOString();
Now, you can send lastTimeFocusedUTC to your Laravel backend.
In your Laravel controller, you can convert the UTC timestamp to a Carbon instance in UTC timezone
use Carbon\Carbon;
$lastTimeFocusedUTC = '2023-08-03T12:10:33.195Z';
$lastTimeFocused = Carbon::createFromFormat('Y-m-d\TH:i:s.u\Z', $lastTimeFocusedUTC, 'UTC');
Then you can use this $lastTimeFocused Carbon instance in your query to compare with created_at
$newLikes = Like::where('liked_id', '=', $request['user_id'])
->where('created_at', '>', $lastTimeFocused)
->get();