#There is no such official rule.
There is no such official rule.
Chapter 1 of the PHB/basic rules, titled "Step-by-Step Characters", lists how to determine ability scores in step 3 (italics added for emphasis):
You generate your character’s six ability scores randomly. Roll four 6-sided dice and record the total of the highest three dice on a piece of scratch paper. Do this five more times, so that you have six numbers. If you want to save time or don’t like the idea of randomly determining ability scores, you can use the following scores instead: 15, 14, 13, 12, 10, 8.
Now take your six numbers and write each number beside one of your character’s six abilities to assign scores to Strength, Dexterity, Constitution, Intelligence, Wisdom, and Charisma. Afterward, make any changes to your ability scores as a result of your race choice.
Using the "4d6, drop the lowest" method of ability score generation, the only limit on what you can roll is what the dice literally limit you to: a maximum of 18 (unlikely but possible, if you roll at least three 6s), and a minimum of 3 (very unlikely - only possible if you roll four 1s).
However, these numbers are the base stats, before racial modifiers are applied. So if you roll at least one 18, and you pick a race that gives +1 or +2 to an ability score, you can start with a score of 20 in that ability.
(The point-buy variant for generating ability scores does have stricter minimums and maximums on what ability scores you can have, but you're not using that method so I won't go into it in detail.)
###The DM can add house-rules - but they should make it clear when they're doing so.
The DM can add house-rules - but they should make it clear when they're doing so.
D&D empowers the DM to run their game as they see fit, and add house-rules if they so desire. However, in your case, it seems like the DM seems to think there's an official rule preventing characters from starting with an ability score of 19 or 20 after adding racial mods. There is no such rule.
I would recommend asking your DM to go through the character creation rules with you, and politely asking them to point out the rule that they think states you can't start with an ability score of 18 or higher. Otherwise, if it's a house-rule, you should ask your DM to make that clear. Then you can decide whether you're willing to accept that house-rule or not.