Typical Portuguese names have around 5 names, two first names and three surnames from both parents.
In fact your description fits quite well how they are used in Portugal, plus a few other nuances.
So, Heinrich August Schmidt has a last name / family name (Schmidt) and two first names / given names.
*"you are" meaning you'd be a German citizen with a German passport.
When you marry, you get to define what is going to be the family name and then children born from that marriage get to be registered with that family name.
In the case of foreign-born people, they can keep the naming rules from their original country. In the case of the marriage between foreigners from two different countries, you have to choose which rules are you going to follow, but the family name stays fixed.
To us (Brazilian marrying a Greek) it was a very interesting process. I have two last family names, and Greek names are gender-conjugated (i.e, the last name changes whether you are a boy or a girl). It the end the simplest thing to do was to just keep only one my last family names.
This is possible because you can make a “name declaration” where you choose to apply the naming law of another EU country.