My platform is Steam but this problem can occure on Xbox or Windows editions.
If it says offline but indeed you are online on the main menu Follow these steps : 🔽🔽
1- Try closing your firewall. If it didnt change anything make the next step.
2-Open your modem/router interface. If you don't know how, please contact with your ISP and get information how to do.
3-Click to the advanced. Then find Portforwarding/Virtual Servers menu.
4-Select HTTP for the service type then press scan, enter your IPv4 adress
5-Enter Astroneer port for the external ports. Be sure that you chose the correct protocol. (The ports which has got red box are the most reliable ones)
‼️Note: All ports and portforwarding photos are at the bottom.
Done! Have a Nice Day