A property of $k$-stable theories. Following the study of Tao's notes about model theory, i found a theorem about $\kappa$-stable theory and order property. It says that if a theory is $\kappa$-stable (with $\kappa\ge\aleph_0$), then this theory doesn't admit the order property. I'll include the proof and something that can be useful.

The question is: why do we need of elementary extension $N$ (and so we don't work only in $M$)?
Here there are the order property and $\kappa$-stable theory definitions.

(Order property) A theory is said to have the order property if there is an $L$-formula $\varphi$ and $M\models T$, with $X\subseteq M$, such that $\varphi$ defines a linear order on $X$.


($\kappa$-stable) We say a theory $T$ $\kappa$-stable, for a $\kappa$-infinite cardinal, if whenever $M\models T$, $A\subseteq M$, and $|A|\leq \kappa$, then $|S_n^M(A)|\leq \kappa$ for all natural $n$. (Note that, $S_n^M(A)$ consists in the set of $n$-type complete in $M$ over $A$.)


(Lemma 1.7.) For any $\kappa\geq \aleph_0$, there is a dense linear order $(A,<)$ with $B\subset A$ such that $B$ is dense in $A$ and $|B|\leq \kappa< |A|$.

 A: To contradict $\kappa$-stability, you need to find a set $A\subseteq M$ with $|A|\leq \kappa$ and $|S_n^M(A)|>\kappa$.
So here's a stupid answer: What if $M$ is small relative to $\kappa$? Say $2^{|M|} \leq \kappa$. Then for any infinite $A\subseteq M$, $|S_n^M(A)|\leq 2^{|A|}\leq 2^{|M|} \leq \kappa$ so there is no hope of contradicting $\kappa$-stability while working in the model $M$.
In fact, it's not just enough to work in a large enough model and find a large enough set $A$: The strategy of the proof is to find a set $A$ which is linearly ordered in a specific order type (the kind described in Lemma 1.7). Now suppose we have some infinite set $X$ linearly ordered by a formula $\varphi$. [Correction: in your definition of "order property", you should include the condition that $X$ is infinite, otherwise every theory has the order property, by definably ordering a finite set.] Then we can use the compactness theorem to find a set which is linearly ordered by $\varphi$ in whatever order type we want. But the key thing is that the compactness theorem produces a model for us, which is in general different from the model we started with. The exception is if the model $M$ we started with is sufficiently saturated - then you can use compactness to show that a certain type is consistent, and realize it in $M$ using saturation.
Moral: If you want to apply the compactness theorem to realize some type, you have to be willing to move to a new model (which can be arranged to be an elementary extension) or work in a sufficiently saturated model to begin with.

In the comments, you ask for more explanation on the application of the compactness theorem. Here's how it works:
By Lemma 1.7, there is a dense linear order $(A,<)$ with $B\subseteq A$ such that $B$ is dense in $A$ and $|B|\leq \kappa < |A|$. For each $a\in A$, let $\bar{c}_a$ be a tuple of new constant symbols of the same length as the tuples $\bar{v}$ and $\bar{w}$. Now write down the following theory: $$\text{EDiag}(M)\cup \{\varphi(\bar{c}_a,\bar{c}_b)\mid a<b\text{ in }A\} \cup \{\lnot \varphi(\bar{c}_a,\bar{c}_b)\mid b\leq a\text{ in }A\}.$$
Here $\text{EDiag}(M)$ is the elementary diagram of $M$. A model of this theory is an elementary extension of $M$, which contains a family of tuples which are linearly ordered by $\varphi$ in order type $A$.
To find such a model, we apply the compactness theorem. We need to show that any finite subset of this theory is satisfiable. Any finite subset of this theory is contained in $\text{EDiag}(M)$, together with sentences asserting that finitely many of the tuples of new constant symbols, say $\bar{c}_{a_1},\dots,\bar{c}_{a_n}$, are linearly ordered by $\varphi$. Such a finite subset is satisfiable in $M$ by interpreting the tuples of constant symbols $\bar{c}_{a_1},\dots,\bar{c}_{a_n}$ as $n$ of the tuples from $X$.
I've only given a sketch of the argument, and Tao summarizes the argument even more, just writing "using the compactness
theorem...". This is quite common in model theory: Once you get used to applications of the compactness theorem like this, they become quite mechanical, and authors often write "by compactness" and leaave the details to the reader. But until applying the compactness theorem becomes second-nature to you, you might be better served by working through a textbook on model theory (Marker's Model Theory: An Introduction or Hodges's A Shorter Model Theory are good choices) before moving on to terse lecture notes like Tao's.
