One point to note here is that questions are not always closed by moderators. Most of the time, off-topic questions are closed by 3-5 regular users (depending on the site). In most cases, these users only know what's on-/off-topic on the site they are participating on, and may not know the correct place to post your question. However, there are some helpful users out there who suggest possible sites where you can ask your question, but that is not always guaranteed.
But finding the right place to ask is your job. Choose a few sites where you think your question might be on-topic and visit each of their Help Centers to find out exactly what is on-topic and off-topic for that specific site. If you're still unsure, or your question doesn't fit on any of the sites you chose, you can do as Glorfindel suggests in their answer.
As the tag-wiki for the site-recommendation tag says:
- Not all types of questions belong on a Q&A site, and not everything can find a home here at Stack Exchange.
- Do some research before asking. It's often helpful to go to https://stackexchange.com, enter some terms in the search bar in the upper-right, check out the sites that show up in the results, and read their help pages. The full list of sites is also available at https://stackexchange.com/sites