How create WInCondition for destroying object?

How create WInCondition for destroying object?

Use a public action.

Have a manager script like this:

using System;
using UnityEngine;

public class StateManager : MonoBehaviour
{
    public static Action TriggerGameEnd;

    private void OnEnable()
    {
        TriggerGameEnd += DoEndgameStuff;
    }

    private void OnDisable()
    {
        TriggerGameEnd -= DoEndgameStuff;
    }

    private void DoEndgameStuff()
    {
        Debug.Log("End game.");
    }
}

Then, in another script, invoke the action, when you want (on destroy in this case):

using UnityEngine;

public class WinCondition : MonoBehaviour
{
    private void Start()
    {
        Destroy(gameObject, 1);
    }
    private void OnDestroy()
    {
        StateManager.TriggerGameEnd?.Invoke();
    }
}

In my test case, it logged EndGame to the console, so it works and is clean.

Also your question is really vague, so this may not be the answer to your problem, what are you trying to do?