You can certainly move the Electronic Arts folder to D, but you'll need to take at least one additional step to tell the games where to look for the user data folders. The simplest is to redirect Documents in its entirety to D, which is easy and supported by Windows:
https://www.tenforums.com/tutorials/74952-move-location-documents-folder-windows-10-a.html
If you have other reasons to keep Documents on D and only want to move the Electronic Arts folder, you could use a symbolic link instead. This guide was written with an external drive in mind, but it works equally well with an internal drive. Just be sure to get the punctuation exactly right, and of course substitute "Electronic Arts" for "The Sims 4" wherever it appears.
https://crinrict.com/blog/2020/02/moving-windows-documents-folder-to-external-drive-via-symbolic-link.html
If you happen to have Sims 4 installed on C though, it might be easier to move its program files to D instead of the user data. The game would load more slowly, but unlike with Sims 3, the difference would be relatively small. And if you have a lot of TS3 custom content, you might prefer to keep it on C so it loads faster. But any of these approaches should work, as long the end result is at least 20 GB free on C.