Assalamualaikum,
Gaining knowledge is one of the best acts of worship a Muslim can do.
وَمَنْ سَلَكَ طَرِيقًا يَلْتَمِسُ فِيهِ عِلْمًا سَهَّلَ اللَّهُ لَهُ
بِهِ طَرِيقًا إِلَى الْجَنَّةِ وَمَا اجْتَمَعَ قَوْمٌ فِي بَيْتٍ مِنْ
بُيُوتِ اللَّهِ يَتْلُونَ كِتَابَ اللَّهِ وَيَتَدَارَسُونَهُ
بَيْنَهُمْ إِلاَّ نَزَلَتْ عَلَيْهِمُ السَّكِينَةُ وَغَشِيَتْهُمُ
الرَّحْمَةُ وَحَفَّتْهُمُ الْمَلاَئِكَةُ وَذَكَرَهُمُ اللَّهُ فِيمَنْ
عِنْدَهُ
Whoever travels a path in search of knowledge, Allah will make easy
for him a path to Paradise. People do not gather in the houses of
Allah, reciting the book of Allah and studying it together, but that
tranquility will descend upon them, mercy will cover them, angels will
surround them, and Allah will mention them to those near him.
Ṣaḥīḥ Muslim 2699
Gaining knowledge is a very good deed and sharing knowledge is also very good.
Uthman bin Affan reported: The Prophet, peace and blessings be upon him, said:
خَيْرُكُمْ مَنْ تَعَلَّمَ الْقُرْآنَ وَعَلَّمَهُ
The best of you are those who learn the Quran and teach it.
Ṣaḥīḥ al-Bukhārī 5027
This hadith shows the importance of learning and teaching knowledge about Islam. So even conquering knowledge is a very good act of worship, but giving others knowledge is even better than that.
عن قتادة قُلْتُ يَا أُمَّ الْمُؤْمِنِينَ (عائشة) أَنْبِئِينِي عَنْ
خُلُقِ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَتْ
أَلَسْتَ تَقْرَأُ الْقُرْآنَ قُلْتُ بَلَى قَالَتْ فَإِنَّ خُلُقَ
نَبِيِّ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ كَانَ الْقُرْآنَ
Abu Qatadah reported: The Messenger of Allah, peace and blessings be
upon him, said, “The best of what a man leaves behind are three: a
righteous child who supplicates for him, an ongoing charity the reward
of which reaches him, and knowledge that is acted upon after him.”
Ṣaḥīḥ Muslim 746
Hope you benefitted from this answer.
May Allah Grant You Jannah...