Example 6 Let $S=\{1,2, \cdots, 2005\}$. If any set of $n$ pairwise coprime numbers in $S$ contains at least one prime number, find the minimum value of $n$.
(2005, China Western Mathematical Olympiad)
Explanation: First, take a subset of $S$
$$
A_{0}=\left\{1,2^{2}, 3^{2}, 5^{2}, \cdots, 41^{2}, 43^{2}\right\},
$$

then $\left|A_{0}\right|=15, A_{0}$ contains any two numbers that are coprime, but there are no primes in it. This indicates that $n \geqslant 16$.

Second, it can be proven: For any $A \subseteq S, n=|A|=16, A$ contains any two numbers that are coprime, then $A$ must contain a prime number.
Proof by contradiction.
Assume $A$ contains no primes. Let
$$
A=\left\{a_{1}, a_{2}, \cdots, a_{16}\right\}.
$$

Consider two cases.
(1) If $1 \notin A$, then $a_{1}, a_{2}, \cdots, a_{16}$ are all composite numbers. Also, $\left(a_{i}, a_{j}\right)=1(1 \leqslant i < j \leqslant 16)$. Let the smallest prime factor of $a_{i}$ be $p_{i}$, then
$$
a_{1} \geqslant p_{1}^{2} \geqslant 2^{2}, a_{2} \geqslant p_{2}^{2} \geqslant 3^{2}, \cdots \cdots
$$
$$
a_{16} \geqslant p_{16}^{2} \geqslant 47^{2}>2005,
$$

which is a contradiction.
(2) If $1 \in A$, without loss of generality, let $a_{16}=1, a_{1}, a_{2}, \cdots, a_{15}$ be composite numbers.
Similarly, we have
$$
\begin{array}{l}
a_{1} \geqslant p_{1}^{2} \geqslant 2^{2}, a_{2} \geqslant p_{2}^{2} \geqslant 3^{2}, \cdots \cdots \\
a_{15} \geqslant p_{15}^{2} \geqslant 47^{2}>2005,
\end{array}
$$

which is a contradiction.
Thus, $A$ must contain a prime number, i.e., when $n=|A|=16$, the conclusion holds.
In summary, the minimum value of $n$ is 16.
Note: The solution to this problem uses the strategy of exploring special cases (taking the subset $A_{0}$) and verifying general cases.