How to make 2 tabels with one to many relation?

I want to have 2 tabels in DB, like: “orders” and “orders_files”. Where “orders” has many “orders_files”.

How to do it?

I made content entity called “orders”.
Tried having there field “entity_referenece”, because I found somewhere on stackoverflow that you can have there multiple id’s put.
But that didn’t work. Also I haven’t found any information about “multiple entity_reference” in drupal 8.

Tried to make two content entieties. I can save, but I can’t connect it(probably) nor I can see them in the Views (tried getViewsData()).

How to do it without GUI (programmaticaly)?
Where do I find proper docs about it?
Where can I find dictionary “Drupal to Rest of the programming world”?
Where can I find good documentation about Drupal 8 or comprehensive examples? Cause I’m pissed on this shit.

Drupal version: