Thanks, I've found out what is causing this. Anki is picking a card ID that is one higher than the highest card ID in your collection. For some reason, your collection has ~2300 cards that have a card ID number that is too large. I am guessing you used an add-on or external program to import material into your collection? It appears that add-on/program is not creating cards correctly.
The number of cards does not matter. You have ~2000 cards that have been created incorrectly. Did you use an add-on or external program to import cards in the past? Or did you import ~2000 cards from a shared deck in the past?
The cards were not added correctly to your collection. Disabling the add-on you used will not fix cards that have already been added. You need to let the add-on author know of the problem, and ask them to fix the problem they have caused.
It is true that any cards you add now - either manually or with an add-on - will have the same problem until those cards are fixed or deleted. But the question is, what caused the problem in the first place? It is unlikely that Anki added the first problem card. Chances are, you have used an add-on that caused this, or imported a shared deck that contained broken cards. You will need to do some experiments to find out the cause. You can create a new profile, and import any shared decks you imported in the past, then see if adding a new card shows the same problem. If it doesn't, then you will need to try each of the add-ons you've used in the past to see which one is to blame.
Sorry, I wasn't able to understand your last message. You should only need to run the above command once to fix all cards, and the problem should not come back provided you do not use whatever add-on/shared deck originally caused the problem.