Questions closed as a duplicate mean the question closely relates to a previously asked question with a currently working answer. Some questions may also be locked as duplicates if the user has posted the same question several times previously.
As for questions that closely relate to a previously asked question, this just means the user may not have utilized the website or Google's search features. This may also mean the user made the question too narrow for the search to be effective. It is better to search in a general topic when looking for already answered questions. Nonetheless, your question has been answered and you can learn off of someone else's question.
Duplicate questions may arise if the user has already asked the same question. While it is unfortunately common for questions to be left unanswered, it is often discouraged to ask the same question again. We understand you may face an issue with your script and want an answer. In this scenario, we ask that you wait a few days, preferably three, before asking the same question. We also recommend removing the previous question as to not get marked as a duplicate.