If you have a good history of mortgage payments, it can help build your credit score.
But if you try to pay your mortgage on credit and your payment is rejected, this could have the opposite effect and seriously damage your credit score.