Electrical Questions? Ask an Electrician Online.
How many screws did existing switch had?
Do you remember which 2 wires together?
Then this is what you need to do. 2 wires that were together splice them to each other and add black pig tail ( short piece of wire to the splice. Connect the other end of pig tail to one of the brass screws on the dimmer. Connect remaining black wire to the remaining brass screw on the dimmer.
Let me know how it goes
does your new dimmer have back stub holes as well as screws?
If yes then you can push one wire in the hole and put another wire under the corresponding screw and tighten the screw
Let me know how it goes.