1 Chronicles 21:8

NLT
New Living Translation

8Then David said to God, “I have sinned greatly by taking this census. Please forgive my guilt for doing this foolish thing.”