You appear to be writing a custom form from scratch using WP_Query to list your options.
The Pods shortcode has a
form="1" option which will output a full form with the admin-defined user interface. It uses React.
WordPress Core enqueues have
Chosen by Harvest is a popular jQuery plugin for turning a select into a searchable UI. It is not sortable.
SortableJS is an example of another sorting library. Like jQuery UI, it creates proxy elements separate from a
Custom sortable forms require custom logic to submit IDs of relevant selected elements in the correct order.
See pods()->save() if you’re looking for a quick way to save the relationship IDs separate from