To build a Blender addon follow these steps
Create a directory for your add-on. Choose a name for the directory that represents your add-on's functionality.
Inside the add-on directory, create a Python script with a .py extension. This script will serve as the main entry point for your add-on.
Open the Python script in a text editor and write your add-on's code. Make sure to follow Blender's add-on development guidelines and adhere to the required structure and naming conventions.
Optionally, create additional Python modules or scripts in the same directory if your add-on requires them.
Zip the entire add-on directory, including the main Python script and any additional modules or scripts.
Open Blender and go to "Edit" → "Preferences" → "Add-ons".
Click on the "Install..." button located at the top right of the Preferences window.
Navigate to the zip file of your add-on and select it.
Click on "Install Add-on" to install the add-on.
Once installed, you should see the add-on listed in the add-ons list. Enable the add-on by checking the checkbox next to its name.
Close the Preferences window.
Few Gotchas!!
1. when you are going to install it as a ZIP file you need to have your main python file named as __init__.py (This is the file that runs when you install the addon)
2.During development you might need to use external editor so here is how you do that
https://docs.blender.org/api/current/info_tips_and_tricks.html#use-an-external-editor