Suppose I fly to America as an example and buy a laptop there, do I have to pay anything when I get back to Germany?
You are obliged to declare the goods to customs above a certain limit. If you go through the green door with the computer at customs, there's a risk of trouble. You evade the import duty.
In Germany you have to pay the VAT. Abroad, you can have the VAT paid by customs returned. This is how it works in the EU. The first sentence applies to the USA.
You have an allowance of 430 euro, everything above that must be declared, i.e. You pay 19% import tax.
Import sales tax, partly customs clearance. The free allowance for air travel is 430 euro.
https://www.finanztip.de/einfuhrzoll/ a small overview. You should look for more details on the https://www.zoll.de/DE/Privatpersonen/Reisen/Rueckkehr-aus-einem-Nicht-EU-Staat/rueckkehr-aus-einem-nicht-eu-staat_node.html page (Customs & Taxes → Travel allowances).
The VAT is NOT returned at customs. They only stamp the export declaration.