Of course, it would be a lovely idea to pop by the chat room first and it's always a good idea to look to see if your question has been answered before, in order to avoid the site getting cluttered by lots of duplicate questions we've seen before.
However, although it's easy to see having your question closed as a punishment (and I too obviously don't want to ask a question that will be closed), it isn't! It doesn't reflect badly on you. Having too many duplicates hanging around is obviously messy and boring. But there's a good reason duplicate questions aren't deleted. They serve as useful sign posts. If you couldn't find the question when you looked, chances are other people won't either. And your new question, possibly with a clearer title, that might be easier to find, might not be necessary but it can point people to the answer and make it easier to find.
So don't worry too much! If a question is closed as a dupe, simply be happy to have found the answer and make sure to leave an upvote on the answer if you like it.
By the way, thanks for trying hard to do your own research - that's great - and I certainly don't want my answer to seem like it's encouraging people to just ask whatever they want without even checking to see if somebody's already asked!!