A Mac opens each file type in whatever app it picked, and that isn’t always the app I’d choose. The place to tell it is the Get Info window, and the button that does the work is called Change All.
Select one file of the type you care about, press Command-I (or Control-click it and choose Get Info), open the “Open with” section, pick the app you want from the pop-up menu and click Change All. From then on every file with that type opens in the new app when you double-click it.
Select a .csv file > Command-I
Open with: pick your editor > Change All
A practical example: I’d want .md and .json files to open in a code editor instead of whatever app claimed them first. One Change All per extension and double-click does the right thing.
It works per type, so you repeat it for each one. Set a .png to your image editor and every PNG follows, but your .jpg files keep their old app until you give one of them the same treatment.
The caveat is in the name. Change All applies to every file of that type, so Apple’s own note says not to click it if you only want that single file to open in the other app.
Further reading: Choose an app to open a file on Mac (Mac User Guide)