Click on object 2d

I want to make an if statement where I check if I click on the object the the script is attached to and it is not clicking on an UI. How do I make this?

Fortunately over 71,000 usable video examples exist for you on Youtube, so nobody has to laboriously retype it here.
6950069--817577--Screen Shot 2021-03-18 at 1.01.24 PM.png