While the term 西方 (xīfāng) has largely replaced 西洋 in everyday conversation and news reports about politics and current events, 西洋 remains active in specific, often cultural and academic, domains.
In short, if you're talking about geopolitics, use 西方. If you're talking about Beethoven or Van Gogh, 西洋 fits perfectly.
The most common mistake for learners is confusing 西洋 (xīyáng) with 西方 (xīfāng). They are not interchangeable.
Incorrect Usage Example:
Think of it this way: a political analyst discusses 西方. A museum curator discusses 西洋.