I don't get that many spam calls, but what I do when I get one varies from answering and immediately hanging up to doing what you suggested (which usually results in them disconnecting after about 5 seconds). Occasionally, I've done things like answering the call and snapping my fingers in the receiver instead of saying "hello" and that usually results in an immediate disconnect.
I'm not sure if any of those things have affected the volume of spam calls I receive though.
Anybody legitimate that's not true. But it's so easy to spoof your number that there are a lot of bad actors.
That being said, I also try to be pretty careful about putting my phone number out there, taking time to judge when a real phone number is needed or not, and asking pretty specifically for what reason a company wants my phone number and often just ignoring the service if an adequate reason isn't given.
Since I've moved abroad, I have apparently been less careful and I occasionally get calls and texts on my foreign sim, and I must have given my email out as there are suddenly lots of hot-singles looking for me, but it is 100% related to my current region, whereas before my Spam folder sat untouched.
Here's what does work (in my experience): answer the call, but say nothing, heck, mute your phone mic if you have to. Just give them silence. I'm not sure if there's some 'person on the other end' detection algorithm or what, but I went from 10-15 spam calls a day to 1 every few days. It took a little while, but it worked. Just don't answer strange numbers with a 'hello?', if someone's trying to reach you, they'll usually say it first.