In the United States, water utilities are legally required to produce a water quality report by July 1st of each year. These reports aren’t perfect. There are quite a few contaminants that are not regulated and required to be reported on and the maximum contaminant levels set by the EPA (Environmental Protection Agency) are not health-based standards.
Nevertheless, these reports are a free resource that gives you insight into your water. You can also use the Environmental Working Group’s (EWG) Tap Water Database. They use public health goals set by California to ensure stricter standards.
If you have well water or want further testing on your tap water, you can look up your local "Cooperative Extension Service" that has lists of local labs for private water testing. Another option is a service called Tap Score, which typically ends up being cheaper and easier and they have a test specifically for well water.
Once you identify what contaminants are in your water (whether you use the free reports or paid), you can choose a filter that filters those. The EWG also has information on this!
Tip: Vitamin C filters are a great way to filter your shower/bath water and can be found on Amazon.