If someone is trespassing on your property you must first ask them to leave if safe to do so.
Then if they do not leave let them know you're calling the police to have them removed from the property and the police will make the trespasser leave your property and warn them if they come back they'll be arrested for trespassing.
You cannot use any force on the trespasser unless they're harming you or about to harm you or your family so just let the police come out and do their job of legally removing the trespasser.
You can only use deadly force such as shooting someone if they're trespassing and you or your family is in immediate threat.
But you also have a duty to retreat so get away from the threat if possible.