When you're getting ready to query an agent, you're not only going to need your manuscript to be as polished and edited as possible, but you're also going to need to make sure you have your query letter and synopsis properly set up.
Query Letter: Your query should NOT give away everything about your manuscript. This is where you want to hook, line, and sink the agent. Entice them to want to read and see more. Think of a query letter as a movie trailer. You're highlighting what the plot consists of and show potential conflicts, but you never give the full reveal so the audience thinks 'oh this looks good, I need to see what happens!'
Synopsis: Your synopsis SHOULD give away everything about your manuscript. It's meant to present the flow of your story and ensure the plot is solid. It's basically a giant summarizing of your manuscript with showing key points (narrative arc, character development, plot points, etc.).
These two are not interchangeable, so it's important to know how to correctly write each one before you set out to query an agent.