Shares will belong to nominee or Last Will And Testament?

I have mentioned my brother as a nominee for my demat account (at the time i had opened my demat account), now i’m writing a will that all my asset will belong to my wife incase i’m dead/something happens.

Shares will be my wife’s or my brother’s ?

My advice will be do not complicate your system change nominee and make same as your will if possible.