How are diazonium salts prepared without self coupling
During diazonium ion preparation, first, sodium nitrite is mixed with hydrochloric acid to produce nitrous acid. The nitrous acid can be protonated under acidic conditions, which undergoes the loss of water and produce the nitrosonium ion ($\ce{O=N+}$; this reaction is usually performed at or around $\pu{0 ^\circ C}$):

An aromatic amine can attack the electrophilic nitrosonium ion to form a nitrosoamine $(\ce{Ar-NH-N=O})$.
The nitrosoamine can undergo a proton transfer (tautomerism) to give corresponding imminol $(\ce{Ar-N=N-OH})$.
Under acidic conditions, this $\ce{N=N-OH}$ group can be protonated and left as a water molecule to give the diazonium salt, which is resonance stabilized $(\ce{(Ar-N#N)+Cl-})$.

The key word here is all of these happen under acidic conditions. Therefore, the aromatic nucleus of aniline derivative is not active because of protonation. Also, during the synthesis, the starting aniline derivative is used as the limiting reagent. In addition, many of diazonium salts are unstable and hence, they are always prepared as needed under acidic conditions with good stirring, kept at or near $\pu{0 ^\circ C}$ to minimize the side reactions such as the reaction with water to produce a corresponding phenol until used in the coupling reaction (usually immediately).
The diazonium salt reacts as an electrophile with an electron-rich coupling component (a phenol or an aniline derivative), through an electrophilic aromatic substitution mechanism under basic conditions (specially when coupling reagent is a phenol derivative). To complete the synthesis of some azo dyes, it is also required heating.