In /wp-content/themes/, create a folder called my-custom-theme and create the following two files:
style.css

In order for WordPress to recognize our theme and output it correctly in the Appearance → Theme list, we need to put some WordPress specific code at the top of style.css, like this:

/*
Theme Name: My Custom Theme
Theme URI: https://yourwebsite.com/theme
Author: Your Name
Author URI: https://yourwebsite.com
Description: This is my first custom theme!
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: <https://www.gnu.org/licenses/gpl-2.0.html>
Text Domain: my-custom-theme
Tags: custom-background
*/

Technically, none of these fields are required, but they are highly recommended if you want your theme to look good in wp-admin. They are also required if you are distributing your theme on WordPress.

Theme Name – You should always provide a name for your theme. If you don’t, the folder name will be used, in our case my-custom-theme.
Theme URI – If used, the theme URI should provide a link to a page where visitors can learn more about the theme.
Author – Your name goes here.
Author URI – A link to your personal or business website can be placed here.
Description – The description is displayed in the wp-admin theme mode as well as in the WordPress theme list.
Version – The version number helps developers track changes and lets users know if they are using a new version. We follow the SemVer numbering system to represent the severity of changes in an update.
License – How you license your theme is up to you, but if you choose a non-GPL compatible license then you will not be able to distribute your theme on WordPress.
License URI – This is just a link to the license listed above.
Text Domain – The text domain is used when translating your theme into other languages. Don’t worry, we’ll dive deeper into this later. For now, it is enough to know that it is a good practice to separate theme folders and text fields with hyphens instead of spaces in the theme name.
Tags – Tags are only used when you upload your theme to the WordPress.org theme directory. They are the basis of the “feature filter” mechanism.