There's no one best strategy to avoid trademark oppositions, as your chances will depend on your mark, the marks of your competitors, the number of classes you choose on your application, your country of interest, etc.
However, you can establish your chances and then move from there. First, you can perform a so-called trademark search to find out about other identical or similar trademarks. You can do so by searching the IP office's database or ordering a professional trademark search service. Either way, we recommend discussing the results with an attorney who can summarize both your chances and options.
It's worth mentioning that you cannot fully prevent trademark oppositions, as they result from other trademark owners exercising their legal rights. However, you can either make your trademark less similar to others or prepare a response strategy, which is again something where professional assistance might be helpful.