How to get Ma'arfat of Allah? How do we know that Allah accpets our amal.

Allah will forgive any sin if one sincerely repents (and gives back the rights if they were something that was taken for example).

To get recognition of Allah we need to refer to the infallible ones Allah sent to guide us and refer to them to get the proper understanding.