Eu poderia substituir "By the age of" por apenas "By"?
Tipo, "By eighteen, I' ve already knew to prepare my own lunch."
I would say so, sometimes "by" will mean "when". Only be careful with "by the time", other than that it´s okay.https://dictionary.cambridge.org/grammar/british-grammar/by
Example:By eighteen he had visited nearly all 50 states and most of America's major cities and national parks.
Anyway, with just a sentence is a bit difficult to grasp the nuance/the subtleties, because "by eighteen" could also mean "at the time of reaching (the age of) eighteen". So, it´s the context - so, more text around it, would turn the comprehension more accurate.
By the age: At the time of reaching the age someone was already doing something...
At the age: He began in the same year as reaching the age.
To my thinking "By" (the age #) could mean one of the above (both of them).