There are a few options. However, the Scrum Guide is silent on what to do.
First, the Development Team can begin work on the next item from the Product Backlog. Ideally, there are more items that have been fully refined in the backlog. The Product Owner should be ensuring that the Product Backlog is always in a good priority order and that the top items have been sufficiently refined to work in an upcoming Sprint.
Second, the Development Team can hone their skills. Use this as an opportunity for cross-training. This can also extend, to some extent, to the Scrum Master and Product Owner. Consider not only technical skills needed by each role to do their day-to-day job, but improving the understanding of the work done by the other roles on the team.
Third, pay down technical debt. Improve automated test coverage, improve manual test coverage (if you have manual testing), convert manual tests to automated tests, build tools to facilitate the development process, refactor parts of the application, gain expertise in other parts of the code that the team may not have been exposed to recently. Do things to make the next Sprint easier.
There may be other options, too, depending on your organization. Helping out other teams meet commitments, code reviews, additional testing.
In any case, the Development Team and Product Owner should work together to determine the best alternative. Perhaps the organization management can also look toward things that need to be done. This is also something that should be discussed at the Sprint Retrospective to determine how to better be more accurate in capacity planning in upcoming Sprints.