Directly before challenging Leon to become the next Galar Region Champion, Chairman Rose will awaken Eternatus in order to recreate the Darkest Day. Leon will rush off in hopes of stopping Eternatus, and Hop will suggest heading to the Slumbering Weald to get the help of Zacian and Zamazenta to also do so. However, at the end of Slumbering Weald, you actually won't be able to enlist their help. Instead, you and Hop will discover the Rusted Sword and Rusted Shield. The two of you will take them, believing they might be able to assist Leon enough to help all of you defeat Eternatus. If you have Pokemon Sword, your player will hold onto to the Rusted Sword and Hop will keep the Rusted Shield.
From there, your trainer will keep the Rusted Sword for the rest of their journey. Both items will help you and Hop summon Zacian and Zamazenta to help defeat Eternatus on top of the summit of the Energy Plant. Later on during the Post Game, you will have to protect the Rusted Sword from Sordward and Shielbert, eventually giving the Rusted Sword to Zacian before going into battle with it.
We have questions and answers related to this topic which may also help you: