How does stealth work in No Man's Sky?

As of right now, there are no functional differences in "ship types," despite what was advertised. There is no known way to prevent pirates from attacking, though carrying less valuable inventory may lower your encounter rate, though this also isn't exactly confirmed.

it doesn’t look like the actual multi-tool or starship you end up picking matters outside of the slot space it offers.

Source: https://www.inverse.com/article/19827-no-man-s-sky-ship-roles-are-basically-meaningless