Level 20
Probably something like this:
https://laravel.com/docs/9.x/eloquent-relationships#constraining-eager-loads
Program::with(['contests' => function ($query) {
$query->where('start_at', '<=', now());
$query->where('end_at', '>=', now());
}])->find($programId);
OR
https://laravel.com/docs/9.x/eloquent-relationships#lazy-eager-loading
$program->load(['contests' => function ($query) {
$query->where('start_at', '<=', now());
$query->where('end_at', '>=', now());
}]);