Scratch orgs versus sandboxes
Key Takeaway
Scratch orgs don't replace sandboxes: Salesforce recommends scratch orgs for source development and sandboxes for release and deployment testing.
Sandboxes and scratch orgs are both places to build and test outside your production org, but they start from different places. A sandbox is a copy of your production org that you keep and refresh over time. A scratch org is a short-lived, empty org that you fill from source files kept in a version control system. Choosing between them, or using both, is part of planning an app's lifecycle.
Sandboxes are isolated from your production org
Each sandbox sits in a separate environment and is completely isolated from your production org. Nothing you do in a sandbox affects the production org, which makes sandboxes safe for development, testing, and training.