Are you running Marlin firmware? If so all the necessary settings will be in the configuration.h file.
It isn’t quite as simple as just inverting the axis - you must change the X & Y end stop actions as well. Have you done any work with the Arduino development environment?
How about the usual question: What printer are you using? Is it a delta? If so, exchange the connections on two of the pylons. Both the motor connections and the end stop connections.
If your printer has printed words correctly in the past and is now printing them mirrored that is thing. However I had some experience with this problem in the past with a Folger tech aluminum prusa. Setting it up according to the build guide at the time made it print mirrored text. The solution to this problem was to bring the y axis end stop to the front of the printer instead of the back. Then you can either swap the dorection the machine homes they axis in the firmware however I prefer to just reverse the physical motor connection