I had one done at 27 because I ever wanted kids. Had to fight with some doctors before one agreed to do it at that age. Unfortunately, insurance didn’t cover it, and I had to pay around 600€. But the ease of mind is priceless. I can only recommend getting a vasectomy to everyone who’s thinking about it!
There is a certain risk to it, yes, but it’s really low. And you can (and should) always talk to your doctor about all the things you are worried about.
One thing you should definitely make sure of is that your doctor has a lot of experience performing vasectomies. You want to find one that does them frequently and ideally has been doing them for years.
For me, getting my wisdom teeth removed was worse than getting my vasectomy. But I guess it’s different for every person.
I’m sure in the end the risk of you regretting not getting one earlier is much greater than the risk of something going wrong with the surgery.