Pamph123 In theory, you could do this with a symbolic link. In practice, I don't know how well it would work. But there's no harm in trying. This is how to create a symlink:
https://crinrict.com/blog/2020/02/moving-windows-documents-folder-to-external-drive-via-symbolic-link.html
But you'd be redirecting a folder within Mods, not the entire Sims 4 folder. So as an example, if your folder on D was called Extra CC, and it was inside a folder called Sims Data, here's the command you'd use:
MKLINK /J "%UserProfile%\Documents\Electronic Arts\The Sims 4\Mods\Extra CC" "E:\Sims Data\Extra CC"
You would of course adjust the command to fit your own naming scheme.
One important note is that script mods (files that have the .ts4script file extension) cannot be more than one subfolder deep inside Mods, and the symlink might count as an extra layer. So if script mods on D aren't loading, move them to C.
If you get an error when trying this, please post a screenshot of the Command Prompt window showing the command and the error.