This error occurs when upgrading to Drupal 9
Change:
$node->field_study_pdf_en->entity->url();
to
$node->field_study_pdf_en->entity->createFileUrl();