Update target (AIDestinationSetter) onmousedown?

Im a beginner and want to know how to set the AIDestinationSetter to a prefab after i click on it? It’s for a 2D survival game like rimworld and want to click on trees to to chop them or mountain to mine them etc. Would happilly pay for the answer, however not $150 at the moment, but when i get tynan rich no problem.