English is an SVO language which means, that in a proper English statement Subject, Verb and Object(s) appear in exactly this order. (Btw: Among all Germanic languages, English is the only one with an SVO order.)
German is not an SVO language. It's a V2 language, like all other germanic languages except English, and this means, that the Verb stands at position 2 in a proper statement. (So, SVO is a more strict subtype of V2.)
Any other parts of speech (all except the finite verb) can be arranged more freely than in SVO languages. Word order is not completely free. There are a lot of complicated rules with maybe even more exceptions, but word order is much more flexible in German than in English.
In English you determine if a group of words is the subject or an object just by its position in the sentence.
correct: The man eats the apple.
Here, only the position of the words tells you who is eating and what is the food. If you let the apple and the man change places in the sentence, the man will become the food, eaten by an apple.
wrong: The apple eats the man.
The German translation of the correct sentence is:
correct: Der Mann isst den Apfel.
But also this is correct and used and understood by German native speakers:
correct: Den Apfel isst der Mann.
It's not the position in the sentence, that lets the apple become the food. In German it's the grammatical case that defines if a part of speech is the subject or an object.
In German the subject is always in nominal case, no matter where in the sentences it is located, and in most sentences the subject is the only part of speech in nominal case. In my example only »der Mann« is in nominative case, and he is in this case in both sentences. But »den Apfel« is in accusative case in both sentences, so it can't be the subject in any of them. So, it's perfectly clear who is the eater and what is the food.
But of course you can do it wrong in German, too, but not by changing places, but by changing grammatical cases:
wrong: Den Mann isst der Apfel.
wrong: Der Apfel isst den Mann.
In the wrong sentences »der Apfel« is in nominative case, and »den Mann« is in accusative case. And this means in both sentences: The apple is the eater and the man is the food that is eaten.
So, for the main clause of your sentence you can use any of these variations, which are all correct:
Wir kaufen Flugtickets am liebsten im Internet
Flugtickets kaufen wir am liebsten im Internet
Am liebsten kaufen wir Flugtickets im Internet
Am liebsten kaufen wir im Internet Flugtickets
Im Internet kaufen wir am liebsten Flugtickets
It depends on which part of speech you want to put the focus of your statement on. Things to put stress on are moved either onto position 1 or to the end, or at some other unusual position.
There are also other word orders possible like »Flugtickets kaufen am liebsten wir im Internet« or »Wir kaufen Flugtickets im Internet am liebsten« but they violate some rules. But some of those rules can be violated under some circumstances, but to explain this would go too far here.