What is the best way to do this?
I want select single post to filter them by using a custom field on the frontend.
But the field value should be settable to only one post.
Other posts should not have the value or the value should be 0/false/empty.
I'm not talking about custom field ui in the backend.
I want to have a custom field value that's "there can be only one" in order to show only one post.
Meta Box does not support an option to check if the field value is unique to save to the database. You might need to create your own custom code to check it and then update the field value for other posts. Please refer to this hook https://docs.metabox.io/actions/rwmb-after-save-field/