Example 1 Color each vertex of a square pyramid with one color, and make the endpoints of the same edge have different colors. If only 5 colors are available, then the total number of different coloring methods is $\qquad$
(1995, National High School Mathematics Competition)
The modified solution better illustrates the principle of multiplication.
Solution: According to the problem, for the quadrilateral pyramid $S-ABCD$, the vertices $S$, $A$, and $B$ are colored with different colors, which gives a total of $5 \times 4 \times 3=60$ coloring methods.

When $S$, $A$, and $B$ are already colored, let's assume their colors are $1$, $2$, and $3$ respectively. If $C$ is colored with color 2, then $D$ can be colored with color 3, 4, or 5, giving 3 coloring methods; if $C$ is colored with color 4, then $D$ can be colored with color 3 or 5, giving 2 coloring methods; if $C$ is colored with color 5, then $D$ can be colored with color 3 or 4, also giving 2 coloring methods. Therefore, when $S$, $A$, and $B$ are already colored, $C$ and $D$ still have 7 coloring methods.
Thus, the total number of coloring methods is $60 \times 7=420$.
These two approaches highlight the special nature of the problem. When the quadrilateral pyramid is generalized to an $n$-sided pyramid, the limitations of these methods become immediately apparent.