Edit the CSS or the functions.php of a theme you downloaded and the next theme update wipes your changes. A child theme is the fix that everyone knows about and nobody likes setting up by hand. WP-CLI writes it for you.
Give it a slug for the new theme and the parent it builds on:
wp scaffold child-theme my-child --parent_theme=twentytwentyone --theme_name="My child" --activate
That creates wp-content/themes/my-child with two files. style.css has the header WordPress needs, with Template: twentytwentyone as the link to the parent. functions.php loads the parent stylesheet first and then the child’s, so your CSS wins. --activate switches the site to the child right away; leave it off if you want to look at the files first. --author and --theme_uri fill the remaining header lines.
The parent theme must be installed, and the slug you pass to --parent_theme is the name of its folder, which isn’t always the display name. wp theme list shows the right one.
Two caveats. Customizer settings and menu locations are stored per theme, in an option named after the theme, so switching to a child can make the site look a bit different until you set those again. Do it on staging first, or at a quiet moment. And the generated functions.php loads both stylesheets with a fixed version 0.1.0, which ends up in the URL. Browsers and caching plugins can hold on to the old CSS after you change it, so bump that number when you do. With a block theme much of the design lives in the Site Editor anyway, so I’d only reach for a child theme there when I need real code changes.
Further reading: wp scaffold child-theme (WP-CLI commands), Child themes (Theme Handbook)