The navigation logic used in the PA28 largely depends on what GPS is selected at the time. If the GPS100 is selected, the aircraft will be using our in-house autopilot/navigation code. If the Working Title GNS530, PMS50 GTN750, or TDS GTNXi is fitted, then the respective GPS autopilot/navigation code is used. There will be some differences in logic between each GPS as each GPS is developed by a different developer, and there will likely also be differences between MSFS 2020 and MSFS 2024 due to differences in framework between the GPS logic in both simulators (particularly with the Working Title GNS530 and PMS50 GTN750).
However, with all of the GPSs, it should be the same steps to get the HSI displaying the GPS flight plan:
Load a flight plan into the GPS (in MSFS 2024, this can be done manually or via the MSFS 2024 EFB)
Press the CDI button on the GPS so that "GPS" mode is active (this should also be linked to the NAV/GPS switch on the console).
If you wish to track a navaid with the GPS, press the CDI button again so that VLOC mode is active and then tune the VOR frequency into the VHF radios (remembering to flip the frequency from the standby to active field).
Hope that helps.
Mark - Just Flight