Is there a difference in meaning or is there a grammatical mistake
English consistently distinguishes between the general and specific case for nouns.
"a car" is general.
"the car" is some specific car.
"I have a car." tells someone that have possession of a car, but also denotes that the specifics aren't especially important.
"I have the car." also denotes possession but now it refers to a specific vehicle, usually specified previously in the conversation. Sometimes the specification comes after, and, other times, it's not given at all because previous shared information is assumed to clarify.
"I was child." is incorrect because you haven't clarified the reference.
"I was Child." could be grammatically correct if the name "Child" applied, but would be capitalized to show that.
"I was a child", on the other hand, would be a correct way of explaining a state of immaturity.
"I was the child." would be the way of claiming a specific example of child.
Now, it's important to now that's the rules for nouns. (Nouns are objects, but grammatical folks wanted that term for other things so we use noun.)
Adjectives follow different rules because they are very different things. They flesh out and describe nouns. "I was ill.", "I was childish.", "I was immature.", and "I was purple." are all grammatically correct because they describe the "I", directly, because of the "was". Adjectives also often modify nouns by being adjacent. "The ill boy was green.", "I, ill, went straight home.", and even the slightly archaic "Childish, I was." are valid.
Note that "the" for the boy in the example. It suggests that the boy was exceptional for being ill. This may not be the best way a language can convey such details, but it's how English does it and it is often useful.
I was a child is correct.
Some languages have a definite article (in English ‘the’) and an indefinite article (in English ‘a’ or [before a vowel] ‘an’).
Russian has neither a definite or an indefinite article. Nor does Latin. Ancient Greek and Arabic (ancient and modern) have a definite article (ό Greek, لا Arabic), but no indefinite article.
Strictly, ancient Greek did have a sort of indefinite article, ‘tis’ (τίς), which is actually called an ‘indefinite pronoun’: that is, it could stand alone to mean ‘someone/thing’.
The indefinite article in romance and teutonic languages is generally the same as the numeral ‘one’. It refers to something either not specific or not yet specified.
In English, no noun (other than a proper noun [name] or an abstract noun) can be use without either a definite or indefinite article. But in some romance languages these exceptions may not apply. So in French both place names and abstract nouns must be preceded by a definite article.
In English an indefinite article is only required in the singular. In the plural, however, English is riddled with exceptions and special cases.
First, ‘children’ can be used on its own.
- This book is not suitable for children.
- Children are often fussy eaters.
- The safety of children is paramount in our school.
This works because we are in these cases talking of children in general (in the abstract). So, not surprisingly, French (and Italian and Greek) would use the definite article (Les enfants, gli bambini, τα παιδιά).
In other cases, English does or may require the use of ‘some’ or ‘any’. You can say either of
- There are children in the garden
- There are some children in the garden.
The finer points of all this are too complicated to explain here. Ultimately, only reading English and talking with English people will do it.
Nevertheless, in your sentence. ‘child must be preceded by ‘a’.