Hello Shami

It is not possible to modify your visa while in Spain.

If you wish to apply for a work and residence permit application, you need to go back to your country and file the relevant...