I saw Google Ad showing "Wikibuy Beating Amazon" on website.
Website is US Based & also I am using USA Net Connection.
Is it legal to put competitor name in commercials in USA?
This is a perfectly legitimate and legal use of a trade mark. However, as with all advertising, the claims must be truthful. If they aren't, then in addition to any state sanctions for untruthful advertising you expose yourself to a defamation suit from the competitor you defamed.
Often, such comparative advertising is actually between trade marks owned by the same company. It eliminates the risk of being sued and gives exposure to both brands in the same add.