How to use Raycast to scan everything under dragged 2d object to specify where it can be placed?

This may be hard to explain.
Im making a card game and i have the basics set up so far but i have an Enum set up to define card types.
enum Slots (Monster, Magic, Equip, blah blah). I was wondering how would I make the code to specify 1 card to be allowed to be dragged and dropped on top of another card else be put back where you got it from. So far all I have in concept thought is
RayCast (something something) {
If Draggable.Slot.EQUIP (is ontop of) Draggable.Slot.Monster {
do whatever the cards are supposed to do.
}
Else parentToReturnTo {
(I forgot what I had for the parent to return to but I hope you get the gist);
}
}

I need help filling in the blanks and i can post both of my scrips for better context of what im thinking of doing if you want but i don’t have a clear way of executing it and google isnt helping me personally. i got most of my code from a good programmer youtuber and i used what he showed in his tutorial and ran with it and i hit a pretty big mental snag here.

I realise that i may be able to use the line

PlaceHolder[] zones = GameObject.FindObjectOfType();

and then search for all gameobject of the Slot.Monster for Slot.Equip to be dropped on top of…right?

or

EventSystem.current.RaycastAll( eventData )

this one is more specific to what is under the mouse so id think this one would work better for what im trying to do.

I suggest you use BoxCast for that, as the documentation states that

A BoxCast is conceptually like dragging a box through the scene in a particular direction. Any object making contact with the box can be detected and reported.

Though BoxCast is 2D only. If You’re going 3D, then you can raycast from all the borders of the card on the directoin of the screen(probably Vector3.forward, I think?) and check if any hit on a card below.

After a good deal of research that comment didnt really help but it pointed me in a good direction. sorta. i need colliders and triggers from 2d colliders section in the engine. i found them and just need to watch a few more videos on how to use them correctly for what i need.
and a good bit of code. c: