Hello!
You most likely just need to add this in your project’s .Build.cs file:
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "Media", "MediaAssets" });
I included Media as well as MediaAssets, but to get the MediaSoundComponent include to build you should only need to add MediaAssets.
And as a side note the include is:
#include "MediaSoundComponent.h"
or
#include "Engine/Source/Runtime/MediaAssets/Public/MediaSoundComponent.h"