Updating value of a fetched field type when original field id updated

Hello, I have a use case where
Say I have
Doctype A with:
field a (any field type)
field b (any field type)

Doctype B with :
field a (Link of Dactype A)
field b Fetched data of field b from Doctype A

So what I want is when I update the value of field b in doctype A it should get auto updated in Doctype B field b too