If you are having Apex classes in Visual Studio code, then you an authorize the org which you need to deploy either it is scratch or non scratch org. then you can deploy the classes which ever you need to deploy. In Salesforce DX, using visual studio code, you can able to login to multiple orgs and can able to select the org based on your option to deploy the apex classes.
Please mark it as the best answer if it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
If you are having Apex classes in Visual Studio code, then you an authorize the org which you need to deploy either it is scratch or non scratch org. then you can deploy the classes which ever you need to deploy. In Salesforce DX, using visual studio code, you can able to login to multiple orgs and can able to select the org based on your option to deploy the apex classes.
Please mark it as the best answer if it helps you.
Regards,
Navin S
Greetings to you!
Please refer to the below links which might help you further with the above requirement.
https://douglascayers.com/2019/02/17/develop-against-any-org-with-visual-studio-code-tasks/
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_develop_any_org.htm
https://forcedotcom.github.io/salesforcedx-vscode/articles/user-guide/org-development-model
https://www.jitendrazaa.com/blog/salesforce/using-salesforcedx-sfdx-with-non-scratch-orgs/#more-6499
https://salesforce.stackexchange.com/questions/244951/how-to-push-code-to-production-with-visual-studio-code-dx
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas