There’s a tool called sqlizer.io which does exactly what you’re after. Upload your CSV file and leave the “Has Header Row” option ticked. It will analyse the contents of the CSV file and generate a CREATE TABLE statement with the column names from the top row and the correct data types to be able to import your data.
It will also create a set of INSERT statements to import your data.
(Disclaimer: I help run SQLizer)