Hey @sohit.pathak
The best approach is (if you use classic activity) to switch to the modern Take Screenshot and place it inside a Use Application/Browser container.
That way, the activity can correctly interpret the element or selector target and execute the screenshot.