How to update current url with query params

I tried to write to the URL/turbo state but could not get it to work… I’m not using a form but conceptually the same.