"#include “Runtime/Engine/Classes/Components/SplineComponent.h” needs to go before the .generated header:
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Runtime/Engine/Classes/Components/SplineComponent.h"
#include "MySplineActorComponent.generated.h"
Or you could just forward declare the class at the top:
class USplineComponent;