The word “that” is often unnecessary, but not always. Be sure you don’t cause readers to stumble.
“Get rid of ‘that’; you don’t need it” is common advice, but as is often true with nuggets of wisdom about writing, it fails to take into account the exceptions. Sometimes that is necessary to ensure clarity.
Consider this sentence: While riding the train, it is hard not to notice most people are leaning into a digital screen. As you read through the sentence, it appears to be saying that “it is hard not to notice most people,” which is clearly not the meaning of the sentence. When you have a verb (in this case, notice), look at the first noun or pronoun that follows it (people). Is that what the verb is referring to? It appears that way initially, but the real object is the entire clause that most people are leaning into a digital screen. In this case, that is needed for clarity.
Look closely at your sentence. If you see that the first noun or pronoun following the verb is not the appropriate object, keep that in the sentence (definition: The direct object is whatever is affected by the action of the verb).
In other sentences, that might not be needed, though you can use it if you want to. A sentence such as The folder that you need is on my desk could be written The folder you need is on my desk, and there would be no loss of clarity. Similarly, instead of saying, “Our office is in a tall building that is made of brick,” most people would say, “Our office is in the tall, brick building.” By reducing the clause “that is made of brick” to the adjective “brick,” you save words.