When My Photo Stream will be turned off permanently, it will only delete its own copies of the photos that are currently stored in My Photo Stream in iCloud. iCloud Photos and Shared Albums are using a different iCloud service and are sfve. All your photos and videos from your iCloud Photos Library and any Shared albums you have, or any photos that are not stored in iCloud at all but on your devices are safe.
You will not have any photos in my Photo stream that need saving, if you have not had enabled My Photo Stream in the Settings > AppleID > iCloud > Photos during the last month or so. My Photo Stream is only a temporary cache storing copies of your in a cache in iCloud for thirty days, so other devices can download them. If you have not used it recently, there will be nothing to save from it. Information about the My Photo Stream shutdown – Apple Support (UK)