Adding a fourth chord to a three chord progression consisting of the I - IV and V chords in a major key can serve many purposes.
For one, it can create a more dynamic and more interesting chord progression. A ii (two minor) or iii (three minor) or vi (sixth minor) chord can add tension to the progression which will beg for resolution back to the root or tonic chord - thereby creating a push pull effect of tension and resolution. A minor chord in a major key progression can serve to lead you to one of the other major chords or serve as a pivot point to switch the order of the progression. These are just some examples of how one of the minor chords can be used in a four chord progression in a major key.
Many possible 4th chords are available including the ii, iii, or vi. You can also use a diminished 7th degree chord or even a flattened 7th degree major chord. Extensions can also be used (7th, 9th, augmented, suspended).
One very commonly used fourth chord in a four chord progression is the vi chord and a popular progression is the I-V-vi-IV progression. Some of the reasons the iv chord is often used as the fourth chord can be found in the answers to this question Why is the I-V-vi-IV chord progression so popular
Ultimately the fourth chord you use depends on what purpose you want it to serve in your song and what you want to accomplish by using it.
A comprehensive online search may yield some helpful guides such as the charts pictured below. As a disclaimer, these charts are merely examples of devices that have been invented to simplify the process of choosing chords and don't purport to offer every possible solution and should not be treated as rules that cannot be broken. Ultimately your goal should be to develop the ability to effectively use your own creativity (guided by music and chord theory) to compose chord progressions that help you express your own personal musical ideas.