Sometimes there’s an action you want a user to take but it’s not a part of their main flow. Force them to focus on a single action by using a modal.
Modals cover any other content until an action is completed or the modal is dismissed. Because modals interrupt a user’s main flow, use as few as possible to minimize disruption. If you have only a single simple action, consider using a dialog.