In this step-by-step tutorial, we’ll build a flexible system from the ground up that allows players to place, rotate, select, and delete various building shapes on a grid, with visual feedback for valid and invalid placements.
https://dev.epicgames.com/community/learning/tutorials/6mY1/unreal-engine-5-grid-based-building-placement-system-complete-tutorial