There are many free and paid themes available that you can use or create theme files.
Steps to create a theme from scratch
Step 1: Create a directory/folder and give a name theme name like my-wordpress-theme
Inside your WordPress directory, Go to wp-contents and open the themes folder.
Enter the name of your custom theme.
Step 2: Create Style.css and Index.php files inside your Custom theme.
Inside our custom theme folder my-wordpress-theme we are going to create files index.php and style.css
In fact, WordPress reads the comments you provide to the style.css file. Here, you can provide details about the topic you are developing.
/* Theme Name: my-wordpess-theme Author: ShahrukhKhan Author URI: https://shahrukhkhan.info/ Version: 1.0 */
<?php // php code ?> <h1>This is my first WordPress custom theme</h1>
Save these files.
Step 3 Activate your theme
After creating the theme login to your WordPress (yourserver/directory/wp-admin) and Go To Appearances in the Menu.
Click on the themes and the theme will be displayed. Click on the activate button on your theme.
It will be activated. Now open your website and you will see the message on the browser window
This is my first WordPress custom theme