If you have the technical know how, I would suggest you remove the shell from the drone and spray paint that separately to avoid contamination any of the electronics or mechanical components.
If you aren’t able to do that, then apply masking tape and/or plastic or any other protective layer over any exposed electronics, cameras, ports, motors etc. Basically anything functional. Also make sure not to point the propellers as this could lead to them being unbalanced.
Before you paint the drones, you may want to scuff the surface with some sand paper. This will provide better adhesion for the paint - if you’ve ever tried writing in marker on a smooth surface, you know how difficult it is to stick.
After you have applied your paint, you can add a clear coat and a fixative to protect the paint.
Here is a video showing how to spray paint a drone: https://youtu.be/5aSsd3tCJ-c, notice how the person completely disassembles the drone before applying the paint.
You may also want to consider a vinyl wrap of hydro dipping as decent alternatives to spray paint.
Here is another example of how to spray paint a more premium drone: https://youtu.be/mP4oyjipwhQ