Maybe you can use request inside of the function. Something like this
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\Hidden::make('profile_id')
->default(function () {
$profileId = request()->route('profile_id'); // Get profile ID from current request, if it's defined in your routing, but perhaps you have to implement other kind of logic
return $profileId;
}),
Forms\Components\TextInput::make('name')
->required(),
]);
}