BPM = Beats Per Minute
Beats per Minute = Tempo that is tied to a clock. Pretty much so that we have an exact reference. Since we all use the same time standard of 60s = 1minute, etc. ... MIDI notes have a time base, based on this same system. Reverb, Delay, chorus etc, also all reference this same time base of one minute. So it's a universal system. All across the world 60sec = 1 minute so 40 BPM is the same for everyone.
Now the question is.... What is a BEAT?
Well a "BEAT" has no universal singular reference. Instead it is a reference to the meter of the music being played.
Perhaps the "BEAT" for a given song is 6/8, 4/4, 12/8, 5/4, 2/4, etc... in each of those cases the second number tells you what get's a "BEAT".
As an example 4/4 means a 1/4 note gets a "BEAT" so you might strum that DUDU ... 1 2 3 4 quarter note durations to form 1 bar of music.
It's very popular for music to have one chord per BAR in simple beginner 4/4 songs.
Soo,... if you are making one down strum per bar and holding the chord, you would count strum 2 3 4 strum 2 3 4.... that would have been 2 bars of music at 40 BPM and you have played a whole note in each bar.... one single down strum per bar where you hear 4 clicks on the metronome.
Now at that same 40 BPM if you strum DUDU | DUDU on each click.... that's also 40 BPM but now you are playing 1/4 notes...
Strum 2 3 4 lasts for exactly as long as DUDU. One is whole note ( 4x 1/4 note in duration ) the latter is 4 individual 1/4 notes.
Your question about when to change chords is correct. Provided the BPM is slow enough, between beat 4 and the following 1 you have to make your change.
But you need to understand what those BEATS mean otherwise when you get a song at a tempo of X BPM you may not play it correctly.
40 BPM is quite slow but if you are beginning that may be fine. If however you find that tempo aligns to a song you like.... it's quite possible the tempo is really 120.
If you are playing 40 BPM than I would expect you are strumming DUDU on each click and yes, getting that change in between the 4 and 1 is what you want to do.
IF you have doubts on BPM, TEMPO, METER, Note values.... now is the time to get that sorted out though.