Simplest and cheapest option is to try a MIDI to USB adapter cable first.
Most work fine.
Very inexpensive normally .. but if one end needs to go into an accordion and the other to computer the length/design becomes an issue.
You don't want too much dangling from the accordion plug.

I don't play nor have an accordion, just speaking from the tech side and trying to visualize how you would physically connect it!


Make your sound your own!
.. I do not work here, but the benefits are still awesome