Moves
Hydro Pump is its main STAB move, which can OHKO Pokemon like Kartana and Tapu Koko in rain.
Scald is another solid STAB move in Golduck's arsenal, since it has 80 Base Power and 100% accuracy. When used under rain, the move still does a respectable amount of damage and also has a chance to burn its targets. Hydro Pump's extra power is much more preferred, however, but if you're paranoid about Hydro Pump's less-than-perfect accuracy, feel free to use Scald.
Encore is great for locking Pokemon into Protect after using the move last turn. It is also good for stopping setup sweepers, specifically Dragon Dance Gyarados, which Golduck would otherwise have a hard time stopping with its weak coverage.
Ice Beam is a good coverage move that dents Pokemon like Drampa and Tapu Bulu, which would otherwise wall this set; in addition, Ice Beam can OHKO Pokemon like Garchomp and Salamence.
Soak is another good support move that can be used over Scald, as it allows Electric-type partners such as Tapu Koko to hit Pokemon for super effective damage, which can KO Pokemon that usually survive its attacks.
Protect serves to buy more time for Golduck as its partner deals with its checks or sets up.
Set Details
Waterium Z allows Golduck to use an incredibly powerful Hydro Vortex. If the Z-move slot is already taken, Mystic Water is a decent replacement, as rain-boosted Water-type attacks are Golduck's main method for dealing damage.
Swift Swim is required for Golduck to boost its average base 85 Speed.
Maximum EVs in Special Attack let Golduck hit as hard as possible, and 124 Speed EVs allow Golduck to out run Choice Scarf Tapu Lele with rain.
Modest nature is chosen over Timid because even without a Timid nature, Golduck outspeeds most Pokemon. The power boost is simply more useful, since its base Special Attack isn't that high.
Usage Tips
Pelipper/Politoed + Golduck is a strong lead combination if none of your opponent's Pokemon challenges them, but considering how popular Electric-types, opposing weather setters, and Gastrodon are, you probably can't afford to use it. Another option is to switch in your rain setter as Golduck uses Protect. If you don't want to do either of those, saving Golduck until all of its checks are gone to sweep is a perfectly fine option.
Set up rain as quickly as possible. If your opponent has an opposing weather setter such as Torkoal or Gigalith, be prepared to engage in weather wars. Always remember that Golduck is significantly slower and weaker without rain, so preserve your rain setter for as long as possible.
Golduck's defensive stats are poor, so be careful of which moves you switch it in on. Switching it in on weak or resisted moves or after an ally has fainted is your best bet.
Golduck should mainly be using Hydro Pump on foes, as it does massive damage with rain. You should save Hydro Vortex for targets bulky enough to survive Hydro Pump, such as Porygon2 and Alolan Muk.
Avoid using Water-type attacks until Gastrodon is gone from the opponent's team. One wrong move against a Gastrodon can easily turn the tides against you. You should also watch out for opposing Tapu Koko and Alolan Raichu, as they are your main offensive threats. Alolan Raichu is able to outspeed Golduck with Electric Terrain, so watch out for that lightning rat especially. They can also survive a Scald or Surf but not a Hydro Pump. Don't be afraid to still let it rip with your Water-type attacks if Tapu Koko has some prior damage.
Team Options
Since rain is mandatory for Golduck to function properly, Drizzle Politoed or Drizzle Pelipper is required to be on the same team.
Kartana makes a good teammates for Golduck, since it easily scares off bulky Water-type Pokemon such as Gastrodon and Milotic, and it hits special tanks like Goodra much harder than Golduck can. Kartana also appreciates having its Fire weakness mitigated by the rain.
Even under rain, Arcanine's typing, natural bulk, and Intimidate ability allow it to handle Tapu Bulu and Kartana well.
Electric-types like Tapu Koko, Alolan Raichu, and Xurkitree greatly appreciate Golduck's ability to eliminate Alolan Marowak, while Golduck appreciates their ability take on Gyarados and Araquanid. They also love to use 100% accurate Thunder, which synergizes well with rain teams.
Golduck gets worn down by status and attacks and is also vulnerable to strong priority attacks. Tapu Fini, Tapu Bulu, and Tapu Lele all give Golduck nice buffs with their respective terrains. Tapu Koko also pairs well with Golduck for the aforementioned reasons.