Slokaardhena Pravakhyaami Yaduktam Grandhakotibhih
Paropakaram Punyaya Papaya Parapeedanam
Essential advice, over millions of books (over millions of years), is very simple. Half a couplet suffice to state that.
The essence is: Helping others is the right thing to do, and hurting others is had
What is intended as a help, at times, turns out to be otherwise. That poses a dilemma as to what is the right thing to do
Srooyataam Dharmasarvaswam Srutva chaiva Vicharyathaam
Aatmanah Prathikoolaani Pareshaam Na Samaacharet
One needs to listen to the right advices/words of wisom, and analyze well, and then follow. You might know that certain acts, by others, can have adverse effects on you. If you do the same, it can hurt others as well. Avoid such acts, by all means.
That is, do not do unto others as you would not like others do unto you