Hi @khawla and welcome to TeX-SE.
I'm assuming your are on Windows and using TeXstudio, much likely because I've got the same errors long time ago and the
-synctex=1 is a default setup. And you are using
pdflatex since it is written on the error message.
In TeXstudio, go to
Options -> Configure TeXstudio and then to
Commands at the left menu. Check the syntax there. Note that
%.tex is replaced by the name of your file.
You may try to use the path to
pdflatex.exe directly setting it. If you have problems to compile with the default syntax, then probably there is some error with your paths. In a standard installation in Windows 10, MikTeX will save
AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64, which you can access through typing
%appdata% at the path bar. In others operational systems, check the correct path. If you installed MikTeX in another non-default folder, then please search for it.
Then you give the explicit path using quotes. You may remove the options
-interaction=nonstopmode if you will.
Any given command inserted at the menu
Commands has the same effect as typing it directly into the command prompt (DOS in Windows), which can be accessed by typing
cmd in the path bar.
If none of this wirk for you, then I stil may suggest to reinstall MikTeX, letting it to install in its default path, and if it still do not work, then reinstall TexStudio.
If you use Linux, then I'm sorry not knowing the details at the same level. But someone in the forum will certainly know if you tell us you are on Linux.