Which is better--Selling call option or buying put option?

To be honest it can be a little confusing for beginners but there is a difference. The intent of both the actions might be the same, to make profits out of the options trade.
When you sell a call option, it is mainly because you think that the strike price is going to be higher than the price you bought it at and you think you will lose money out of it. In this scenario, if the strike price remains below the price of you selling the call option, the asset price will go to the so called seller of the call option as profit. But if the strike price exceeds the asset price, then the seller is liable to pay the difference to the buyer.
Similarly when you buy a put option, you expect the asset price to be far lower than the strike price. Buying a put becomes profitable when the stock moves below the strike price by an amount greater than the premium paid for the put option.
I hope I could clarify your doubt!