...
As the Development Team works, it keeps the Sprint Goal in mind. In order to satisfy the Sprint Goal, it implements functionality and technology. If the work turns out to be different than the Development Team expected, they collaborate with the Product Owner to negotiate the scope of Sprint Backlog within the Sprint.
Scrum Guide
For how the sprint goal is structured, one approach that teams find useful is to have a user story so that in the sprint review we have a demo