If you're driving a shitbox in a nice neighborhood and get pulled over for an obvious fishing stop or if you're pulled over for some legitimate infraction it's generally a good idea to roll with whatever their pretense is, give them some bullshit smalltalk answer about where you're going and draw a firm "I do not consent to any search" line if they push the issue.
Cops are incentivized to varying degrees based on department and time of month to write tons of tickets and/or go fishing. You don't wanna start the stop off on the wrong foot by being that "am I being detained" jerk right from the get go. You should not give up your rights but it's not generally helpful to assert that you know them until they probe to see whether you do. By asserting your rights before you have been challenged you're escalating the stop. It might work out for you, but maybe the K9 guy is an asshole and the cop wants to make him drag his ass across town for no good reason. Don't be his reason.
Cops deal with tons of stops and there's a range of what's typical. Your job is to act and answer questions in a way that gets you labeled as typical in the cops mind causing him to make the stop progress in a typical manner without any extra fanfare (like the whole drug dog routine). Once a stop is on track to go a certain way it's very hard to get off that track. So do your best to get the stop onto the track where all the cop has to do is checks your papers and giving you a warning or ticket.