Here are the steps to add a product, categories, and sub-categories in Magento:
Log in to the Magento back end.
Go to “Catalog” and select “Manage Products”
Click on the “Add Product” button in the top right corner.
Fill in the required information for the product such as product name, SKU, price, etc.
Select the appropriate product type, for example, simple, configurable, etc.
Click on the “Categories” tab and select the appropriate category and sub-category for the product.
Upload an image for the product under the “Images” tab.
Click the “Save” button
To add a category:
Go to “Catalog” > “Categories”
Click on “Add Root Category” or “Add Subcategory”
Fill in the necessary information for the category such as name, description, and image.
Click on “Save Category”
To add a subcategory:
Go to “Catalog” > “Categories”
Click on the category you want to add a subcategory to.
Click on the “Add Subcategory” button in the top right corner
Fill in the necessary information for the subcategory such as name, description, and image.
Click on “Save Category”
It’s always a good practice to test the changes on a test environment before applying them to the live website.