I'm trying to control the intensity of the vignette depending on the distance to the player. The script itself is located on the prefab. When creating a prefab during the game, the vignette does not appear.
But if the prefab is added to the scene before the game starts, the vignette is visible and its intensity is adjustable. 
The prefab is the opponent. Here are the vignette settings:

I will also add part of the enemy code where the vignette control should take place:
private PostProcessVolume postProcessVolume;
[SerializeField]
private Vignette vignette;
public float vignetteIntensityMultiplier = 1.2f;
private Transform player;
void Start()
{
player = GameObject.FindGameObjectWithTag("Player").transform;
postProcessVolume = GameObject.Find("PostProcessingVolume")?.GetComponent<PostProcessVolume>();
if (postProcessVolume != null)
{
InitializeVignette();
}
}
void InitializeVignette()
{
if (postProcessVolume.profile.TryGetSettings(out vignette))
{
vignette.intensity.value = 0f;
}
else
{
Debug.LogError("Unable to get vignette settings");
}
}
private void Update()
{
float distanceToPlayer = Vector2.Distance(transform.position, player.position);
if (distanceToPlayer > followDistance)
{
transform.position = Vector2.MoveTowards(transform.position, player.position, speed * Time.deltaTime);
}
if (vignette != null)
{
float intensity = (followDistanceForVignette - distanceToPlayer) / followDistanceForVignette * vignetteIntensityMultiplier;
vignette.intensity.value = intensity;
}
}
vignettein the Update? \$\endgroup\$