Navigational AI Meshes in Unity 2021 but works in 2017-2031 (speculation).
Try this out a few times, then continue with • How to bake/update NavMesh at Runtime in U... and later with something more advanced like • Runtime NavMesh Generation - Introduction ...