Refurbished MacBook Pro 2014 turns off without keyboard or trackpad interaction
I bought a macbook pro retina 15 mid 2014 that is in the macOS big sur 11.7.10 version, it only turns on if I press power and if I keep pressing "command" and "option" on the right side, after that, it only remains on and working if I keep touching the keyboard or if I get my finger on top of the trackpad, and when I stop clicking 1min passes the message appears "are you sure you want to turn off your computer I click "cancel" and it still turns off I wanted to know why this happens? Can someone help me?
[Re-Titled by Moderator]
Original Title: Refurbished Macbook that turns off out of nowhere if it doesn't touch the keyboard or trackpad
MacBook Pro 15″