To avoid seeing "License key not available for WinCC logging" again:

Are you seeing this error during on an IPC, or just while simulating your project in TIA Portal?

. This often happens if the IPC was shut down improperly (e.g., power failure) while the Runtime was active. Simulation Mode

Licenses the core operation based on the number of external tags used.

If you use a served by the Automation License Manager Server :

Search for in the Windows Start menu. Ensure the service is "Running."

Solving "License key not available! WinCC Logging for Runtime Advanced" in TIA Portal

: This key is required for historical data logging, including Alarm Logs Combined Options