Device that transmits signal to computer
I suggest using an Arduino-style microcontroller platform. A microcontroller is a chip that you can program to do many things. Many of them have a built-in USB serial port, so you can send data from the chip and receive it on the computer. You can even write your own computer program to process the data, easily enough.

Note that you don't just want the chip, you want the whole board that's already set up and ready to program. The Arduino boards are examples of this, or the Blue Pill, or the Teensy.

You would connect your sensor to the microcontroller board and program the microcontroller to send data to the computer when the sensor trips. You would write another program for the computer, to play an alarm sound (or whatever you want it to do) when it receives data from the microcontroller.

If you want to send data across a large distance, you can find an add-on board (probably designed for an Arduino, but usable with other boards too) that will let you insert a SIM card and send data through the Internet using the cellphone network. That will be more complicated to set up.