Is it possible to execute your shellcode not on the stack? Is there another way to execute the shellcode? Thanks in advance
Yes, it is possible, but there's a lot of things to say here.
First of all, code on the stack is usually not executable on many modern devices which use the NX-bit.
But more generally speaking, any part of memory can be made executable if you manage to get the required privilege. This can be the heap, the RAM, any area of the drive. It doesn't really matter.
The stack is just the most common default attack, but shellcodes can, for instance, also exploit heap overflows, (see this answer for an explanation).
One common attack structure would be:
Hope this answers the question