I don't quite understand your question, but I'll give a couple of answers and hope one hits what your asking.

There are two ways to create the executable file:

Option 1:
cc -c main.c -->(this should create object file main.o from source file main.c)
cc -o main main.o -->(this should create executable file main from object file main.o)
./main -->(this should produce the output NAMAH SHIVAY)

Option 2:
cc -o main main.c -->(this should create executable file main from source file main.c)
./main -->(this should produce the output NAMAH SHIVAY)

The single cc command in Option 2 combines the two cc commands in Option 1 into one command, and skips the step of creating the object file main.o. The command "cc -c main.c" does not produce any output if it is successful, but you can check if the object file was created with the command "ls -l main.o".

The command:
cc -c main.o
is not valid because the command "cc -c" needs to be followed by a source code file (.c), NOT an object file (.o). "cc -c" is used to create (compile) an object file (.o) from a given source code file (.c). You have instead given it an object file (.o), so there is nothing to compile.