I can't see your code so I have no idea how you code works. The example below is based on the official docs. The docs also how onchange works.
ASP.NET Core Blazor data binding
@page "/onchange"
<PageTitle>OnChange</PageTitle>
<h1>OnChange</h1>
<input type="text" @bind:get="text" @bind:set="Set" />
@code {
private string text = "";
private void Set(string value)
{
if (value == "0") {
text = "1";
return;
}
text = value;
}
}