How do I fetch the ID from the URL?
I found following solution which works for me.....

VIEW > ADVANCED > Contextual filters

Add filter and look for WHEN THE FILTER VALUE IS NOT IN THE URL section.

Select 'Provide default value' > Type: Raw value from url > Path component: ____ (set url id value path number)

e.g if this is url, to get 239066 I will set Path component: 3

(https://drupal.abc.com/questions/239066)

VIEW > Attachment settings > HEADER > Add: Text area > Replacement patterns section will display your url id i.e {{ arguments.url_id }}