How to create drag and drop game

Hi. In the game, there will be a blank box with an answer beside it and below the box, there are 3 draggable objects, 1 correct object to be put into the box and 2 incorrect ones. If I drag the correct one, the game continues with different set of objects and answer. If I drag the incorrect one, it will simply restart the game. I have the drag and drop script, but I have no idea how to do what I said before and I appreciate any help.

Thanks in advance!

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;

public class DragAndDropMinigame : MonoBehaviour, IPointerDownHandler, IBeginDragHandler, IEndDragHandler, IDragHandler
    [SerializeField] private Canvas canvas;

    private RectTransform rectTransform;
    private CanvasGroup canvasGroup;

    private void Awake()
        rectTransform = GetComponent<RectTransform>();
        canvasGroup = GetComponent<CanvasGroup>();

    public void OnBeginDrag(PointerEventData eventData)
        Debug.Log("begin drag");
        canvasGroup.alpha = 0.6f;
        canvasGroup.blocksRaycasts = false;

    public void OnDrag(PointerEventData eventData)
        rectTransform.anchoredPosition += / canvas.scaleFactor;
    public void OnEndDrag(PointerEventData eventData)
        Debug.Log("end drag");
        canvasGroup.alpha = 1f;
        canvasGroup.blocksRaycasts = true;
    public void OnPointerDown(PointerEventData eventData)
        Debug.Log("point down drag");


My understanding is that the box will hold the object and decide if it is correct or not. So the checking part will be done by the box. You need a script that will accept the dropped object and check if it is the correct one. The script only has to know whih draggable is correct and if the draggable object that you drop on the box is not correct you can say it is wrong. You can use OnCollisionEnter2D for checking the draggables(assuming they have colliders). you might want to close the draggable collider on pickup and open them on drop. If the drop is on the box, box should set the objects parent as its own and move it to its center(pivot(Vector3.Zero)). I hope it helps. It is a long post so if it is confusin let me know.