How to get update in indexer whenever a new block is added

i want to update my database when ever any new block is added. how can i do that