There are ways of structuring code, of naming variables, of writing documentation, that simply are better than others even though functionality may be the same.
There is no way of acquiring this good taste except by reading code written by people with good taste.
If you're self taught, the easiest way to do this is by jumping into some code bases that have been written by people with good taste. Look at how they name things. Which private functions they define vs which things are inlined. Which bits of code merit a comment.
The best way to do this is to find some oss libraries that _you_ use, and just looking at the source code for them. You'll quite quickly realize which are easy for an outsider to understand and which are hard. You'll empathize with a 3rd party reader. And you'll learn more about how they work too!