Check the MUI migration guide to v7
If you wish to use the legacy Grid without much changing, you can rename your import
// import { Grid } from '@mui/material';
import { GridLegacy as Grid } from '@mui/material';
if you wish to use the latest Grid component, you can refer to the specific update guide for Grid here