Generally, the troubleshooting steps outlined above should not affect your data. Hard resets and power cycling do not erase saved games or user data. However, if a more serious hardware issue is at play, there may be some risk to your data.
The Nintendo Switch offers cloud saves via the Nintendo Switch Online subscription service, which can be a lifesaver in such situations. If you have been using this service, your saves will be backed up and retrieved even if your console needs a factory reset or replacement.
If you haven't been using the cloud save feature, this might be a wake-up call to consider it. Knowing that your progress is safe, even when technical issues arise, can provide peace of mind.