If you are only replacing one of your 3-ways with the amazon basics smart switch then it matters which one you replace. Look at the product images and it tells you it has to be the one that the light runs to.
Here is my disclaimer: In order to make this switch work you have to have conventional 3 way setup. In order to make this switch work you have to know which switch is getting line and which is getting load. In order to make this work you need to change wiring on both your old existing 3-way that is staying and the new one. The instructions glaze over the fact that you have to turn one of the travels into line power. If you can't identify all the wires properly I wouldn't attempt this install. There are better 3-way smart switches out there that wire in like a traditional 3 way. Kasa is one of them.
Wire color is irrelevant because it is subjective. A traditional 3 way has 2 traveler wires that run between the 2 switches, 1 ground, and 1 line/load. The line comes from the electrical feed and the load goes to the light fixture. Normal light switches don't use a neutral wire. Smart switches do because they also need power.
The amazon basic 3 way doesn't get wired like a traditional 3 way. It uses a current sensing module to determine if the 3 switch on the load side is flipped. For this reason one of the travelers that is on old school 3 way needs to be tied into the line side and fed to the smart 3 way. They don't mention this in any of the instructions but show it in the wiring diagram.
Look at the pictured in the listing and it shows how it needs to be setup. https://www.amazon.com/Amazon-Basics-Dimmer-Neutral-Required/dp/B095X8YD3Q?th=1
Also one of the reviews gives details about this:
"Works as advertised but installation is tricky and the written instructions skip some key steps (probably bc they don't want to assume how your wiring is set up). While I am DIYer, I have ALOT of experience with electrical wiring, definitely more than most. 2 key things you need to know - 1) The switch must be the switch that is wired to the light (the instructions DO actually say this); 2) You will need to re-purpose one of your travelers on the wire between the switches and use it as the "Line" for the smart switch. You will only have one traveler from the first switch to the smart switch. This is not clear in the written instructions/steps but you will see it when you closely study the wiring diagram (at the bottom of the page) which is (as always) showing you end state of how the wiring should look when you are done. As a baseline, there are 3 different ways to wire a 3 way, mine looked like this (I believe this is pretty standard when power starts at the 1st switch) when I started: First switch (3 way) - 14/2 power (Line) attached to common terminal, 2 travelers from a 14/3 wire going to 2nd switch (red & black) attached to traveler switch terminals (neutrals (white) from "Line" and 14/3 capped together in box), at 2nd switch (3 way) - the 14/3 travelers were attached to traveler terminals on 3 way, 14/2 wire going to light with black connected to common terminal on switch, and white capped with white from 14/3 wire from 1st switch. to make this work, I took the black traveler wire and capped it to the "Line" wire in the first box. So the Line is attached to common terminal on 1st 3 way switch and the black traveler going to the smart switch. The first box now only has one traveler (red), the other traveler in 1st box has no wire (this is in the diagram). In the 2nd box (the Smart Switch), the red is connected to the brown wire, and the black traveler is connected to the "Line" wire on the smart switch. My configuration only used one smart switch, there is a configuration using 2 smart switches and I believe the set up is the same as what I described. If you are unable to baseline your existing 3 way light configuration or don't understand what I described, you should call an electrician. Alexa set up was a snap - opened Alexa app on my phone and it automatically discovered smart switch, I just had to rename it. Works great! Would have been 5 Stars if install instructions were a little better. Tried to call Amazon support for help - it was 15 minutes of my life I will not get back. Found more help in reviews/comments but decided to post my own review with my specific configuration."