Plain open file does what a double-click does, so a PNG lands in whatever app macOS thinks owns PNGs. Half the time I want something else, and the -a flag lets me name the app right on the command line.
Give -a the name of the app, then the files. The name is the one you see in the Applications folder, without .app, and quotes are needed when it has spaces:
open -a Preview *.png
open -a "Visual Studio Code" .
The first line throws every PNG in the folder into Preview in one go, the second opens the current folder as a project. If you’d rather not depend on the display name, -b takes the bundle identifier instead, so open -b com.apple.TextEdit notes.txt always hits TextEdit.
Two more flags combine nicely with -a. -g opens the file without pulling the app to the front, handy in a script. -n starts a new instance even when the app is already running, and anything after --args is passed to the app itself instead of being treated as files to open.
The caveat is that -a only changes this one launch. Your default app for that file type stays the same, so double-clicking still uses the old one. For a permanent change, use Get Info in Finder and the Open with section there. And if you mistype the app name, open just says it can’t find it, so check the spelling against /Applications.
Further reading: open man page (SS64)