Can you spray paint one color on top of another color of spray paint?
You should be able to do this. The success depends on a few factors as follows:


Make sure that the first color coat is fully dry before applying the second color.
Make sure to try out a test run before committing to your master art project.
Some colors will cover better than others.
Some paints are better than others for color hiding. Paint quality and price play a role here.
Spray painting with stencils can be tricky to get sharp edges so special care and technique need to be developed.
Stencils often get taped onto the first coat of paint. This will demonstrate how well the first coat adhered to the substrate when removing the tape. This means that it is very important to properly prepare the first coat surfaces to ensure maximum adhesion (including primer if applicable).
Keep in mind that the best success with spray paints is to use multiple light coats instead of heavier coats. Done carefully this can eliminate runs and uneven application of paint. This is mentioned because the initial light coats through the stencil may not provide the full color hiding capability of your spray paint.