You need a 232 or USB to 422 converter lead, the FX series programming port is a mini din socket & 422 communication.
There are a number of leads out there for example the SC09 cable that is 232 to 422, this would also require a USB to 232 converter if you do not have a legacy 232 port (be aware that on Win11, some of these USB to 232 converters do not work as the drivers have not been updated), if you go 232 to 422 cable route like the Mitsubishi SC09 then the USB to 232 lead needs to be the FDTI type chip.
Amazon has these plus USB to 422 leads although I have never tried them only a SC09 and a UGreen USB to 232.
If your FX is a clone then a lot of them have 232 port by default.
Once you have the lead/leads, create a project with plc type i.e. FX3 but a simple project in ladder not a structured project.
Click on the connection destination & select the type i.e. 232 (even if using USB to 232 plus SC09) select the com port in most cases it will select 115kb baud the other parameters are by default correct, press Connection test once successfully connected select online from top menu, read from PLC then tick all boxes this will upload the program. Note: if the program was written as a structured project then it cannot be re-constructed as a structured one so will read it in ladder, there will be no comments & if it was originally a structured one there will be loads of jumps round the main code to subroutines but at least it will be the code.
This all assumes the PLC has not been password protected.