There are times when the Lord does not hear prayers.
If I regard iniquity in my heart, the Lord will not hear me: Psalm 66:18
Jesus said in the Sermon on the Mount:
Therefore if thou bring thy gift to the altar,
and there rememberest that thy brother hath ought against thee;
Leave there thy gift before the altar,
and go thy way; first be reconciled to thy brother,
and then come and offer thy gift. Matthew 5:23-24
That means if you have unforgiveness in your heart, and even more,
if you have not done your best to reconcile with your brother
when there was an issue between the two of you,
God wants you to do what you can to make peace with that person.
Then, He will welcome you.
Another example: Paul warns husbands that their prayers will be hindered
if they do not treat their wives well.
Likewise, ye husbands, dwell with them according to knowledge,
giving honour unto the wife, as unto the weaker vessel,
and as being heirs together of the grace of life;
that your prayers be not hindered. 1 Peter 3:7
Whoso stoppeth his ears at the cry of the poor, he also shall cry himself,
but shall not be heard. Proverbs 21:13
This one is significant of the mercy we show others.
We cannot expect mercy from God if we refuse to extend it.
For he shall have judgment without mercy, that hath shewed no mercy;
and mercy rejoiceth against judgment. James 2:13
Think of something you have done that God has forgiven you for.
Ask Him to give you that same mercy for others.
Jesus is the just judge, we are not.