Nokia 5 has some unnecessary apps. Those includes weather service, weather database, etc. All are in stub version and those apps doesn't have tge option of battery optimisation thus showing battery optimisation not available. The Chinese variant of Nokia 6 has those weather apps but Nokia 5 being a stock Android should not have stub versions of weather apps. Remove those apps ASAP from system.