If you have completely regularized your situation as a foreigner in Spain, you can start with your company by following these steps.
Obtaining NIE.
Application for company name
Bank account opening
Signature of the public deed
Registration in the Commercial Registry
CIF application
High social security.