I’ll bet you use sugar and/or cream in your coffee. Sugar is the worse but cream, especially the non-dairy creamers aren’t good either.
Your shifter has a bunch of spring loaded gates with push button switches. These may be attached to a circuit board, but they can just be individually wires and mechanically attached to the gates. You coffee saturated one of the switches where the contacts are, probably the 1st gear switch and shorted the terminals.
The sugar and/or cream delayed drying so the mixture remained conductive longer, telling the cars computer that the 1st gear is selected by the driver. As it dries, it will become less conductive, but the residue will want to absorb any moisture in the air so on very wet days when there is a lot of condensation, this problem will reoccur.
I don’t know your car specifically, but most follow the same design for the console. You empty the rear storage compartment and down in the bottom, there should be a cover that you can pry up. Under it there should be one or two screws. There may also be one or two screws at the very forward edge of the compartment. Remove all these screws and then lift the compartment out of the way.
You should see two more screws at the back of the console cover that goes over the stick shift. You also need to pull the insert out of the cup holder and there should be one or two screws under it. Remove all these screws and you should be able to lift the cover up over the stick shift. Now you should be able to see all the gates and switches.
Use a Q-tip soaked in distilled water to clean the back of each switch. Do not use alcohol, it doesn’t work well with sugary residues, water is much better. Then put it all back together.
Or you could just pour hot water down into the shifter where the coffee went. Just do it on a warm dry day where you can leave your windows open to dry out the interior. Pour just a little at first to soften the residues, then follow a few minutes later with a little more, and then again a few minutes after that. No more than about a cup of hot (distilled) water should do the trick.