You must have followed the guide linked below first.

https://defusestudios.com/sgk-v2-added-ignore-actor-classes-setting-to-ground-check-component/

Go to the BP_GroundCheckComponent and create a new variable called UseSurfaceRestrictions and set its type to E_InventoryRestrictionType then tick Instance Editable.

Create another variable called RestrictedSurfaces and set its type to EPhysicalSurface and tick Instance Editable.

Now create a new function called SurfaceRestrictionsCheck and add a new input call Surface and set its type to PhysicalMaterial and add an output called ReturnValue and set its type to Boolean.

Then copy the images below.

You can now select the BP_GroundCheckComponent in any build part and set surface types which will allow you to only be able to place a build part on specific surfaces or allow you to block placement of build parts on surfaces.

This uses the surface type found in physics materials, you can find out more about them here.

https://docs.unrealengine.com/en-US/InteractiveExperiences/Physics/PhysicalMaterials/HowTo/index.html