If I believe that something is halal after examining all the evidence and arguments to the best of my ability, and I end up doing that thing in this life, but then, on the Day of Resurrection, I am informed that it was actually haram, will I be punished for it?
All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
The religious ruling regarding this matter is not the same for lay-Muslims and students of knowledge. A lay-Muslim, who does not have the ability to understand religious texts and evaluate evidences, their authoritative weight, and the rules laid by the scholars of Ijtihaad (independent reasoning) to deduce religious rulings from their sources and weigh the seemingly contradictory proofs against each other and the like of important qualifications of Ijtihaad is obligated to consult with scholars and act upon their fatwa in the matters about which he has no knowledge. If he fails to do so, then he has not cleared himself of his liability from the obligation in this regard. Allah, The Exalted, says (what means): {So, ask the people of the message if you do not know.} [Quran 16:43]
Al-Qurtubi wrote:
"A lay-Muslim, who does not have adequate knowledge to practice Ijtihaad given his lack of qualification to do so, is obliged to consult the most knowledgeable scholars of his time and country and follow their fatwa; Allah, The Exalted, says (what means): {So, ask the people of the message if you do not know.} [Quran 16:43] He has to strive in looking for the most knowledgeable scholar until he finds the scholar upon whose knowledge most people agree." [Tafseer Al-Qurtubi]
As for the seekers of knowledge who can exert intellectual efforts in studying and investigating the matters, they should study the scholarly views, decide which view is preponderant, and act upon it; by doing so, one has cleared himself of his liability regarding the obligation in this regard. Sa'eed ibn Jubayr said, "He who limits himself to what he has heard (i.e. acted exactly upon what he knew with evidence) has done well."
Allah knows best.
You can search for fatwa through many choices