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 is His slave and Messenger.
The mere obedience to your mother and complying with her command to go early to the mosque is not ostentation; rather, it is part of the obedience of Allah and following His Sharia because it is obligatory to obey the parents in what does not constitute disobedience. The Prophet said, “One who pleases his parents pleases Allah, and one who angers his parents angers Allah.” [At-Tirmithi - Ibn Hibbaan and Al-Haakim graded it saheeh (sound)]
There is much goodness and a great virtue in going early to the Friday prayer, and a person who is able to go early should not miss this opportunity. The Prophet said:
“The one who performs Ghusl (ritual bath) on Friday and then goes (to the mosque to perform the Friday prayer) is like one who offers a she-camel as a sacrifice, and the one who comes at the second hour is like one who offers a cow, and the one who comes at the third hour is like one who offers a horned ram, and the one who comes at the fourth hour is like one who offers a hen, and the one who comes at the fifth hour is like one who offers an egg. And when the imaam comes out, the angels come and listen to the mention of Allah (the sermon).” [Al-Bukhari and Muslim]
Therefore, what your mother had commanded you to do is correct and is good for you, and you have to perform all your deeds sincerely for the Sake of Allah.
You should beware of ostentation and what would invalidate your deeds, as Allah does not accept any deeds except those that are sincerely devoted to Him and comply with the Sunnah of the Prophet . It was authenticated that Allah said in a Qudsi hadeeth, “I am the most un-needy of partners. Whoever does an action associating somebody else with me, I reject him and his Shirk (polytheism).” [Muslim]
Finally, it should be noted that a Muslim should beware of opening a door for the devil to cause him to have doubts about his intention and purpose, and perhaps afterwards he will lead him to leave a righteous deed on the grounds of lack of sincerity and fear of ostentation; this is indeed one of the hidden doors of the devil, which one should be careful of, because abandoning a deed because of people is also ostentation, as Al-Fudhayl ibn Iyaadh said. For more benefit, please refer to fatwa 23080.
Allah knows best.