I had a major brain surgery 20 years ago for a brain haemorrhage to remove a blood clot. I was wondering if it is safe to ride on roller coasters?

Wrong place to ask. Only someone who knows your current state of health & any issues around such a procedure should respond to this question. It is not a one size fits all answer. Talk to your current doc about this. .