Text popup on target hit

Hi all, first time posting, new to unity. such a great program. Just wondering if I could ask some help, I have created a mathematical shooting game, and need to understand how to create a popup window of text once a target has been shot. I have everything else just this im not quite getting.
I have a ray cast bullet (I have followed Jimmy Vegas FPS script for this) and target disappears once hit, not a problem, however i need to add a script that prompts a popup window with a question, 1+1= is fine at the moment. then user will need to input answer and that will determine if target survives or dies.
eventually will need to randomize questions however for the prototype any popup with correct answer should destroy target. any advice or help would be much appreciated, sorry if this is somewhere else in the forums, (I did look but couldnt see), look forward to getting more involved with the community as my scripting skills improve. Thanks.

Have the popup window disabled at the start, and when the target is hit, enable it.

Ideally, you would use an event, but since you’re just starting out, an easier way would do.

You can use either script as long as it can detect when the target is hit.

Put all the GameObjects that make up the popup under 1 parent, store a reference to that GameObject in the script, and enable it when the target is shot.

Ok thanks for that, yea kinda makes sense, so just to clarify a few things…

  1. is the popup a 2d canvas with a text script attached for randomized questions?

  2. the event would be ‘OnDamage’ calling for the target to get damage to action said event?

  3. then would need an if statement to validate answer and perform true outcome?

  4. if i have got this correct do i create separate scripts or do i embed code into existing scripts and reference it?

I think i understand what you are saying i am just unsure of best way to execute it. but i do appreciate your response as it has given me some direction on how to research solutions.