Schengen Visa Spain- advice after appeal

I recently applied for a short-term tourism visa to Spain for a week in June. Despite submitting my application on April 1st, I received a rejection on the 18th. I appealed on the 30th but received another rejection today. What surprises me is the reason they provided: they have 'reasonable doubts' about my purpose of travel and fear I may overstay, claiming it wasn't justified properly. Now, I'm considering applying to another country and staying a couple of nights there before going to Spain. However, I've heard this might be considered 'visa shopping,' which is illegal. How can I ensure my travel plans are legal and not shady? Also, should I be concerned that my recent rejection and appeal would affect my chances of getting approved by another country soon? Would the appeal and rejection be visible to other Schengen countries, potentially leading to more rejections?

Appreciate the help. 🥹