Question: how to use spfx in sharepoint online?
Answer: What is SPFx?
Steps.
Open the Command prompt from your location on windows explorer.
Then write the below command on your cmd prompt to create new project and press enter.
Next go to that project directory by using below command to create new web part and press enter to run the command.