It depends a lot on the type of music you're playing.
According to what you expose, I assume you don't know yet basic triad shapes and other chord shapes on your figerboard.
What I'd recommend you is this:
Study a fretboard visualization system, like the CAGED. DO STUDY IT. LEARN the CAGED chords in Major, Minor, Diminished qualities and later Augmented too
Learn the chord progression of many songs trying to associate each chord in the song with a chord shape from the CAGED system.
Do the same with the basic triads (learn the major, minor, diminished and augmented shapes on in all string sets).
LEARN to harmonize major and minor scales using your CAGED system chord shapes (this is essential).
4.1 A needed extra would be to learn the tonal functions of each chord inside a tonality
For each shape from the CAGED system learn also major, minor, pentatonic scale shapes.
Practice a lot and repeat.
Learn also arppegio shapes for each chord from the CAGED system.
This is a lot of information. It will take time for you to make it an active part of your musical toolset yet it's worth the effort.
Learn chord progressions from song and practice your CAGED shapes.
This practice will ultimately help you to know your fretboard well and easily recognize chord shapes in the music you play.