I wouldn't call that a modulation at all, it's a common pop/folk song, mostly in E minor, just with a short visit on the relative major side.
The minor's relative major lives in the same double house, just the next door, and the visit is short, just having a cup of tea, not starting to use the major's fridge or sleeping in the same bed or anything.
Modulation would mean a more long-term change.
In other words, even during the G chord, would you say that's home, where your journey ends naturally?
In my opinion, if right after the G chord you play an Em, that's a possible home and could be the end, although a bit surprisingly quick ending.
There's a few different ways to move harmony around, see my answer to "How to determine passing chords" How to determine passing chords If you want to keep the Em and G while still preparing the listener for the D chord in a slightly less abrupt way, put an Am7 before the D in place of the Em.
This is "trick 2" in the answer linked above.
If you start changing things, you might try, for example moving a voice down in steps like this, and setting the chords accordingly.
This is "trick 1" in the answer linked above.
(A little bit of trick 2 applied as well, in B7 - Em and Am6/F# - B7 - Em.)
However, that changes many other things as well, like the chord rhythm, which doesn't go One-two-
THREE One-two-THREE anymore.
And now "liljor och akvileja" get quite a different feeling, etc.
And we don't go to the G major chord at all. :)
music.stackexchange.com/users/51766/piiperi Reinstate Monica
The simplest, most effective and most used transition chords are Vs, or V7s.
The dominant of the new 'key'.
So here, in Em, D G is unsurprising.
It may not even go under the banner modulation, as those other chords at that point are all included within the key Em, so it's hardly that it's gone into G, especially being back in Em after only three bars.
You ask if there's another way.
Several.
Going direct from Em to G is one.
Cm to G works, as does Co to
G. A basic premise is notes moving a semitone to the new chord.
The last one does easily - C>B, E&flat;>D, G&flat;>G.
music.stackexchange.com/users/2808/Tim
One way (but as Tim notes above) that one can move along the cycle of fifths e-a-D-G.
This may not sound much like a modulation though.
(One cannot play notes in the new key that don't occur in the old key.
That's useful on things like C-G or Ab-d or the like).
To get the G to "stick" as a key, one
my find it useful to use an extended cadence like A7-D7-G or the like.
In a short piece like the one posted.
These harmonic movements may be "tonicizations" rather than complete modulations.
There is not enough time to indicate a full modulation.
music.stackexchange.com/users/23838/ttw
This is the best way and quite usual, many minor tunes do this as G is the relative key of em.
i (em) =
>
vi (G) em-D-G
= vi-V-
I could also be reached by em C D G (vi IV V I)
I wouldn’t call it a modulation.
This is a short extension to the relative key ... 4 bars later we are back in e-minor.
music.stackexchange.com/users/56219/Albrecht Hügli
An F#7(#9)(#5) would resolve to G (deceptive cadence)and would keep the melody on top.
Although if you choose to use such a chord it would be important to have a few other similar secondary dominants in your arrangement.
music.stackexchange.com/users/66972/Quintediese
In this case - a simple folk-song style and a modulation to such a closely-related key as to hardly count as a modulation at all - I see no advantage to anything more complicated.
music.stackexchange.com/users/17003/Laurence Payne
I'm no theory expert in the least.
In fact I would say novice is a stretch when it comes to theory.
I use this change quite often when noodling around.
When I can think to not jump back and forth with the standard walk up & down.
Couldn't this be considered
iv V
I progression in Gmajor?
music.stackexchange.com/users/66991/John Thornton
In this version they modulate from Em to G by the chords Em-D-G? Is there a better way of doing it?
With what chords do we modulate from Em to G?
music.stackexchange.com
<harmony>
music.stackexchange.com/questions/96149
music.stackexchange.com/users/20754/Hank
 I wouldn't call that a modulation at all, it's a common pop/folk song, mostly in E minor, just with a short visit on the relative major side. Modulation would mean a more long-term change. An F#7(#9)(#5) would resolve to G (deceptive cadence)and would keep the melody on top.  Although if you choose to use such a chord it would be important to have a few other similar secondary dominants in your arrangement. Modulation would mean a more long-term change. If you want to keep the Em and G, put an Am7 before the D in place of the Em
A common pop/folk song in E minor has a short visit on the relative major side. Modulation would mean a more long-term change. If you want to keep the Em and G while still preparing the listener for the D chord in a slightly less abrupt way, put an Am7 before the D in place of the Em. An F#7(#9)(#5) would resolve to G and would keep the melody on top. Even if you use a chord such as this, it is critical to incorporate a few complementary dominant harmonies. In this case - a simple folk-song style and a modulation to such a closely-related key.