By default, the navigation bar is set to display as a large title. However, if you want to keep the navigation bar compact and disable the use of a large title, you can add the navigationBarTitleDisplayMode modifier just below the navigationTitle modifier like this:
.navigationBarTitleDisplayMode(.inline)
The parameter specifies the appearance of the navigation bar, determining whether it should appear as a large title or compact title. By default, it is set to .automatic, meaning that the large title is used.
In the above code we set it to .inline indicating that a compact bar should be used.