Not really sure what is the issue here as it looks to be specific to your machine. I am able to get past the questions and create a solution.
However, as a workaround for your issue, you can try the below steps:
Paste the below command to see the list of command line options available for the SharePoint generator
yo @microsoft/generator-sharepoint --help
It will show up as below:

Based on that, you can create the command string and generate the project as below:
Assume that you want to create an SPFx webpart with React framework, then your command would be as below:
yo @microsoft/sharepoint --solutionName "hello-world" --framework "react" --componentType "webpart" --componentName "HelloWorld" --componentDescription "HelloWorld web part" --environment "spo" skipFeatureDeployment false
Similarly, you can create/modify the above command as per your requirements.
Reference - Scaffold projects using yeoman SharePoint generator
Also, ensure that you have enough disk space for those node modules. It will take up approx 300 MB space.