The king took his place of authority beside the pillar and renewed the covenant in the Lord’s presence. He pledged to obey the Lord by keeping all his commands, laws, and decrees with all his heart and soul. He promised to obey all the terms of the covenant that were written in the scroll.
2 Chronicles 34:31 NLT
https://bible.com/bible/116/2ch.34.31.NLT
Josiah wanted to follow God, knowing that Judah was going to be judged after he died. He helped Judah follow the Lord in his lifetime by following God's instructions. I need to follow Jesus' instructions like Josiah followed God. He followed God with all his heart and soul and that's how I need to live my life for Jesus.