Jesus went on to the synagogue, not only because He desired to worship His Father according to the Law, but because He had a divine appointment. There He found a man with a withered hand - a man who needed the Lord’s mercy and grace. But there was a problem: The hard hearted Pharisees were watching Him to see if He would heal the man, so that they might condemn Him. Knowing this, Jesus healed the man anyway.
We consider two things:
If you’re a true believer struggling with hardness of heart, then use the means the Lord has given to grant you more of the Spirit to soften your heart with His love. Pray for more of His Spirit, continue seeking Him until your heart is full, and then be careful to keep your grace strong by walking with Him. If you are not a believer, ask Him to give you a new heart - He can and will if you will come to Him humbly and ask Him sincerely.