Assalamu Alaykum Dear Sister,
Thank you so much for asking this question and for contacting Ask About Islam.
It is true, as you mentioned, that intentions are absolutely crucial to having our deeds accepted by Allah Almighty.
As the Noble Prophet (peace and blessings upon him) said:
It has been narrated on the authority of Umar b. al-Khattab that the Messenger of Allah (peace be upon him) said:
“(The value of) an action depends on the intention behind it. A man will be rewarded only for what he intended. The emigration of one who emigrates for the sake of Allah and His Messenger (peace be upon him) is for the sake of Allah and His Messenger (peace be upon him) ; and the emigration of one who emigrates for gaining a worldly advantage or for marrying a woman is for what he has emigrated.” [Sahih Muslim]
So this is why it is very important for us to constantly check our intentions.
To answer your question on how exactly you can fix your intention, here are a few tips.
Before you start doing any action, ask yourself the following:
1- Why am I doing this action exactly?
2- How is this deed helping me in my relationship with Allah?
3- How is this action helping me fulfill my purpose in life?
To know more about the purpose of life, check here:
4- How is this action affecting my heart and my iman?
5- Is there a disobedience of Allah in this action?
6- Am I compromising something in my deen by doing this action?
7- Is this action done purely for the sake of Allah?
Of course, ultimate concern is to do the good deed for the sake of Allah Glorified and Exalted because this is the essence of sincerity and the mean to have our deeds accepted.
Remember this hadith:
On the authority of Abu Hurayrah (may Allah be pleased with him), who said that the Messenger of Allah (peace be upon him) said:
“Allah (glorified and exalted be He) said: I am so self-sufficient that I am in no need of having an associate. Thus he who does an action for someone else’s sake as well as Mine will have that action renounced by Me to him whom he associated with Me. [Related by Muslim and Ibn Majah].
So always remember this hadith as well to fix your intention. At the end of the day, if we do an action for the sake of someone else or something else on the surface on this earth, then we must remember that:
“Everyone upon the earth will perish, And there will remain the Face of your Lord, Owner of Majesty and Honor.” (Quran 55: 26-27)
Allah ultimately is the only Eternal and the only Everlasting, so it is more worthy to dedicate our actions to The Eternal Creator not the mortal creations.
Hope this helps.
Salam and please keep in touch.