Use modals for collecting information
Modals excel at collecting vital information for tasks that demand immediate user focus. They create a dedicated space that isolates the user from the main content, ensuring that attention is given to the critical task at hand. For example, if users are completing a financial transaction, a modal could be employed to collect payment details securely. This scenario benefits from the heightened focus that a modal offers.
However, it's good practice to consider alternative, less disruptive elements like inline forms for tasks that don't require immediate user attention. When used thoughtfully, modals can make the process of gathering important information more efficient and focused.

