How can I click on an x,y coordinate in a web page with js and snippet

How can I click on an x,y coordinate in a web page with js and snippet
For example, I want to click on the coordinates (100, 150) and then after 3 seconds click on (200, 100).

i tried but it can’t work. If anyone knows it, please help me