We all sin and we should all ask for forgiveness for our sins. There are certain steps that will allow us to ask God for forgiveness in a more sincere manner.
The first step is to have a feeling of guilt towards the sin. The guilt is coming from the regret we feel toward sinning against what God. This guilt has to be real in order for it to make the forgiveness sincere.
The second step is to promise to never commit the sin again. We make an agreement with God that we will try our best to never commit that sin again.
If the person can make up their sins, then they have to. For example, if someone decided to skip prayer, they have to make up the prayers they skipped. That is only after they have felt guilty and promised to never commit that sin again.
However, some sins cannot be made up after they are committed. For example, if someone listens to music, there is no way of “making it up”. All one can do is feel guilty and make the intention to never commit the sin again. Another example is if someone views something explicit, again here the person must feel guilt for committing the sin and promise to never do it again.
Some scholars advise us that if we sin with a certain body part like our ears, then we should use that same body part in obeying God. For example, if someone listened to music, he should then repent and listen to Quran, Dua (supplication), or a lecture.
Lastly, after you follow these steps, recite Astagfurallah (I repent to God and seek His protection from sin). These steps, God-willing, will aid in making our forgiveness sincere.