just follow the steps ng will working fine otherwise kindly do following things
If you're having issues running the ng command in a Angular project, there are a few things you can try:
Make sure that you have the Angular CLI (Command Line Interface) installed. You can install it by running npm install -g @angular/cli in your command line.
Check that the ng command is in your system's PATH by running ng -v in the command line. If this command returns an error, then ng is not in the PATH, and you'll need to add the path to the Angular CLI package to the PATH environment variable.
If you have recently updated or changed your Node or npm version, there may be compatibility issues. Please check your current version and target version, If there any version mismatch please try uninstalling and installing with correct version.
Try re-installing the Angular CLI by running npm uninstall -g @angular/cli, and then npm install -g @angular/cli.
Try running the command prompt as administrator.
If none of the above solutions works then you can try to create new project using ng new projectname.
Please let me know if there is any specific error message you are getting and also if this is working for you or not ?