I have an idea for a product that shares many characteristics with existing products, but that will have a few differences. I want to make sure there's going to be enough of a difference between my product and existing products, that I don't run afoul of any copyrights or patents. How can I do that?
For copyrights, the answer is simple. Copyright does not apply to ideas, only to concrete expressions of ideas. Also, copyright does not apply to "products", only to creative works. (With the added weirdness that computer programs were shoehorned in as "kinda-sorta works of literature".)
So, unless your product is, say, a poem or a song, then copyright does not apply. And even if your product is a poem or a song, then copyright still does not apply to the idea, only to to the concrete expression.
And lastly, even if ideas were copyrightable (which they aren't) and products were subject to copyright (which they aren't), copyright only applies to … well … copying. So, if you came up with the idea on your own, then it is not a copyright violation. If you have never heard Yellow Submarine and have no idea who The Beatles are, then you can write Yellow Submarine, and it will not be a copyright violation. (It's just going to be very hard for you to prove that is the case.) Copyright is not exclusive.
So, only patents are relevant to your situation. Patents are exclusive. However, they are also public.
That is why patents were invented in the first place. Inventors used to keep their inventions secret, for fear that someone would steal them. This made progress very slow, because it was not possible for other inventors to "stand on the shoulders of giants", so to speak.
So, what we came up with was the concept of patents: the government guarantees that you can exclusively use your invention for a limited amount of time, but in return, you must publish it so that everybody can study it, improve it, and build upon it. But, they need to license it from you.
So, the standard way to protect against accidentally violating a patent is to do a patent search. Patents are public, however, doing a patent search properly needs some skill, so it makes sense to leave that up a professional. Patent law firms, for example, offer patent searches as a service, and there are specialized patent search firms as well.
Copyright does not protect ideas at all, only ways of expressing ideas. If you did nor copy from nor imitate an existing document, design, or image there should be no copyright issue.
Patents are searchable. Here is a search form for the US patent office. You can also pay a search firm to run a patent search,
The type of search you need is called a "freedom to operate" search. It looks narrowly only in the countries you plan to make, sell, export to, etc. but looks broadly for any aspect of your actual product that might infringe some patent whether or not it is central to your product's uniqueness.
You are focused on avoiding being the same as an existing product but a patent might be held by a third party. Copying something exactlty might not infringe anything but making the change you contemplate might stumble into someone else's patent.
What is normally called a "patent search" is a worldwide search for previous publications or patents that anticipate, or make obvious, the idea a proposed invention is based upon.