as the title said, if a player use repelling blast as an ready action and the trigger is when when the enemy attack / casting spell, does the enemy attack / casting wasted?
Unless the feature that grants a reaction says otherwise a reaction occurs after its trigger.
The Ready action specifically is resolved after its trigger.
So if Eldritch Blast was readied to be cast when the caster is next attacked then the Eldritch Blast would be resolved after the attack. If the triggering attack was made in melee then the caster would likely have disadvantage on the attack roll for Eldritch Blast.
as the title said, if a player use repelling blast as an ready action and the trigger is when when the enemy attack / casting spell, does the enemy attack / casting wasted?
I might add that repelling blast isn't a thing that can be done on its own, it is an invocation that modifies the effect of your Eldritch Blast cantrip (if you have it).
Repelling Blast
Prerequisite: eldritch blast cantrip
When you hit a creature with eldritch blast, you can push the creature up to 10 feet away from you in a straight line.
There's ways Readying eldritch blast could effectively waste action with Repelling Blast. For exemple, if your Ready Action trigger is when an enemy moves adjacent to my ally, as soon as he finish doing so you could attack it and possibly push it away and if it's out of movement it won't be able to get back into melee range of it.
Since repelling blast does not require an action, you can always just decide at the moment that eldritch blast hits the target whether you want to knock them back or not, whenever that moment occurs.
as the title said, if a player use repelling blast as an ready action and the trigger is when when the enemy attack / casting spell, does the enemy attack / casting wasted?
If you ready Eldritch Blast to go off when a caster starts casting a spell I don’t think there is anything in the rules for interrupting (if it’s a 1 Action cast). But if it was a concentration spell that was already cast or a caster had their own spell readied (which requires concentration) and you had the appropriate trigger you might be able to break that concentration as usual.
And as others have said you could Repelling Blast a melee combatant out of their reach to waste their turn.
as the title said, if a player use repelling blast as an ready action and the trigger is when when the enemy attack / casting spell, does the enemy attack / casting wasted?
Unless the feature that grants a reaction says otherwise a reaction occurs after its trigger.
The Ready action specifically is resolved after its trigger.
So if Eldritch Blast was readied to be cast when the caster is next attacked then the Eldritch Blast would be resolved after the attack. If the triggering attack was made in melee then the caster would likely have disadvantage on the attack roll for Eldritch Blast.
I might add that repelling blast isn't a thing that can be done on its own, it is an invocation that modifies the effect of your Eldritch Blast cantrip (if you have it).
There's ways Readying eldritch blast could effectively waste action with Repelling Blast. For exemple, if your Ready Action trigger is when an enemy moves adjacent to my ally, as soon as he finish doing so you could attack it and possibly push it away and if it's out of movement it won't be able to get back into melee range of it.
Since repelling blast does not require an action, you can always just decide at the moment that eldritch blast hits the target whether you want to knock them back or not, whenever that moment occurs.
"Not all those who wander are lost"
If you ready Eldritch Blast to go off when a caster starts casting a spell I don’t think there is anything in the rules for interrupting (if it’s a 1 Action cast). But if it was a concentration spell that was already cast or a caster had their own spell readied (which requires concentration) and you had the appropriate trigger you might be able to break that concentration as usual.
And as others have said you could Repelling Blast a melee combatant out of their reach to waste their turn.
EZD6 by DM Scotty
https://www.drivethrurpg.com/en/product/397599/EZD6-Core-Rulebook?