God, angry with Israel, moves David to take a census. David realizes his sin and repents. He must choose a punishment and wants to be in God's hands, not men. David sees the angel killing people at a threshing floor, and he cries out for mercy in the midst of the plague. God through Gad tells David to raise an altar at that place. David buys it at full price, and offers sacrifices there. It is the future site of the temple (1 Chronicles 21:28-22:1).
How this is about Jesus
David is an exalted yet imperfect ruler, and knows it; Jesus brings perfection.
Jesus has had some outstanding disciples to great deeds - the giants of chcurch history.
Jesus intercedes for His people, with the costly sacrifice of Himself.
Just rule is to people what sun and rain are to crops. Pursue it in the home, church and state.
David does not bring utopia to Israel. God remains angry - an atonement is still needed: Christ.
Your sins can damage others greatly, yet there is a place of forgiveness.