Yes, if you forgive others for the wrongs they do to you, then your Father in heaven will also forgive your wrongs.
But if you don’t forgive others, then your Father in heaven will not forgive the wrongs you do.
“This king did the same as my heavenly Father will do to you. You must forgive your brother or sister with all your heart, or my heavenly Father will not forgive you.”