Can a commercial pilot get paid by friend?
If your friend approaches you and asks for a one-time ride, you're fine to charge for it. If you decide to advertise, or your friend tells a friend who tells a friend and word of mouth is that you offer an air taxi service, you are holding yourself out as a carrier and need to get a part 135 operating certificate.

Same thing with ferrying, banner towing, etc. If you are offering it to the general public as a service you need to get an operating certificate.