my macbook pro shut down and giving a 3 beep sound continuously

my 2012 macbook pro suddenly stuck then shut down and when i try to restart it gives a 3 beep sound(beep beep beep) continiously. why this happen do i have to buy another macbook? is this a bad error?
https://support.apple.com/en-us/HT202768

Check this out.
thank you for your support but it is happening again and again and screen is going freak

Original thread: https://forums.imore.com/threads/my-macbook-pro-shut-down-and-giving-a-3-beep-sound-continuously.382702/