Here are steps to develop a SPFX web part in the SharePoint online:
1.Download and install Node.js.
2.Download and install Visual Studio Code.
3.Run PowerShell: npm install gulp-cli yo @microsoft/generator-sharepoint --global
4.Trust the self-signed developer certificate, run PowerShell: gulp trust-dev-cert
5.Run PowerShell to create a new solution: yo @microsoft/sharepoint
6.In the new solution, compile codes to meet your requirement.
7.Run PowerShell to package the web part: gulp package-solution –ship
8.Upload the web part package into App catalog.
9.Add the web part into the page.
Reference:
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.