Extension development coding standard for Magento OS and Magento Commerce?
in general Magento follows the PSR1 and PSR2 with some small changes. Here is a list of the standards: https://devdocs.magento.com/guides/v2.4/coding-standards/bk-coding-standards.html
But since you start on this you should always take a look at the technical guidelines. This is a set of rules /recommendations that got beyond the coding style. It explains with examples how to follow the SOLID principles and how to implement different design patterns: https://devdocs.magento.com/guides/v2.4/coding-standards/technical-guidelines.html These are not magento specific, you can follow these in any project on every framework or even technology.