How do I know that my intention is good and dedicated only to Allah?
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.
Sincerity means that the servant intends by his/her acts to draw closer to Allah the Almighty.
Ibn Al-Qayyim said in Madarij As-Salikeen:
“Sincerity is the filtration of work from anything that may spoil (or blemish/undermine) it.”
It means: the intention to do something should not be mixed with what is desired by the soul, such as looking good in the sight of people, seeking their praise, evading their criticism, seeking their admiration, expecting their money, service, love, and them fulfilling his needs, or other reasons and matters that spoil one’s deeds, which are all based on intending by one’s acts to get the satisfaction of others, no matter who he is, rather than Allah the Almighty.” [End of quote]
Thus, if the meaning of sincerity became clear to you based on the aforesaid, then you can know your situation whether you are sincere in your acts to Allah the Almighty or not, and it is only you who knows this.
Allah knows best.
You can search for fatwa through many choices