There's a Python library called genanki that has a minor learning curve but isn't terrible to figure out. My process is to maintain a gsheet with data I use to generate my flashcards, then manually download the CSV data, and run a Python script to convert everything into the Anki format.
If I'm not mistaken it's also possible to import CSV data directly into anki without the intermediate Python script
Anki can import csv files.
That said, making decks is extremely tedious. It’s better than a premade deck for learning language vocabulary, but it’s time consuming.
You shouldn’t make vocabulary cards programmatically. If you’re going to invest time into learning a card, you need to be absolutely sure that it’s correct. Otherwise you’ve wasted your own time.
When I was using Anki daily, I’d reserve about 20 mins or so in the evening to input new words.