The printer shows the offline state due to various underlying reasons. This issue might not be with the printer itself. If you want to fix it on your own. You must identify the cause of printer offline windows 10. Check for the reasons given below one by one and identify the cause of the problem to fix it.
Check if your printer is properly connected to the power source and the power cable is not damaged.
Check the printer settings. Make sure it is not set to use on an offline mode.
Check if the system and the printer are properly connected to the same network.
You will surely find a way to fix it after checking these points. Hope this helps!