Starfield bug, where EVERYBODY attacks you, for no "apparent" reason.
The "bug" (which really isn't a 'bug'), is where all of a sudden, everybody attacks you, hates you and wants to kill you, whether you're on a planet or in space. Sometimes, you will be marked with a bounty... sometimes not; either way it is disheartening, when even Sarah hates you!
If you are on PC, this will instantly fix the problem. Open the game folder (where "Starfield.exe" is), and create a new text (.txt) file. Name it anything you want, but I named mine "NoBounty.txt". Open it, then Copy/Paste this into that text file:
>!SetCrimeGold 0!<
>!player.paycrimegold 0 0 5BD93 ; United Colonies!<
>!player.paycrimegold 0 0 638E5 ; Freestar Collective!<
>!player.paycrimegold 0 0 10B30 ; Crimson Fleet!<
>!player.paycrimegold 0 0 26FDEA ; Neon/Ryujin Industries!<
>!player.paycrimegold 0 0 22E53D ; Trade Authority!<
In game (preferably, after opening a SAVE that doesn't have you as "Enemy #1", and when you're still loved)... open the console with the "~" (tilde" key.), and type the following into the console:
>!bat NoBounty!<
Hit the 'Enter' key and your "loved by all" again.