After asking a question on SE, one user, in the comments section, asked one question and, with my answer, he asked another question and added a consideration that solved my problem.
I thanked him and told him to create an answer for the question.
Immediately after doing that, an answer pops-up, from another user, that apart from solving the problem, made some considerations on performance (that are helpful but not required to solve my problem).
The user that helped me solve the problem in the comment section then shared his answer.
I ended up marking the answer of the user that helped me solve the problem in the comment section as correct and adding a comment to upvote the other answer as it has an extra considerations related with performance, however, as I am having doubts if my approach was the right one, I decided to share it here to hear your feedback.