What is this 'ball' in front of the cockpit of some fighters, e.g., an Su-57?
That is the infrared search and track (IRST). This particular model of an IRST is known as the OLS-50M in Russia and uses quantum well photodetectors.

Radar has two serious limitations, one is that advanced software can jam it, the other is that you give away your position when transmitting radar signals.

An infra-red sensor can be used to find and destroy targets without giving away the position of the aircraft and cannot be jammed. IRST is especially effective at detecting low-flying vehicles like helicopters that would otherwise be lost against a background. IRST can also be used to find, hunt down and kill ground vehicles.