To import CSV files into SQLite, you can do this in your terminal:

sqlite3 mydatabase.db
SQLite version 3.43.2 2023-10-10 13:08:14
Enter ".help" for usage hints.
sqlite> .import --csv mydata.csv table_name

If the table already exists and the field names don't match the header names, you can also skip the first row:

sqlite3 mydatabase.db
SQLite version 3.43.2 2023-10-10 13:08:14
Enter ".help" for usage hints.
sqlite> .import --csv --skip 1 mydata.csv table_name

Importing the file again overwriting what is already in the table:

sqlite3 mydatabase.db
SQLite version 3.43.2 2023-10-10 13:08:14
Enter ".help" for usage hints.
sqlite> begin;
sqlite> delete from table_name;
sqlite> .import --csv --skip 1 mydata.csv table_name
sqlite> commit;