You seem to be sorting by range (with that range restricted to a single column) instead of sorting by sheet (which is what you need to do).
Do NOT highlight the whole of column A, and then sort it, as that invokes 'sort by range', which will leave column B unchanged. Instead, select a SINGLE CELL from column A and then use the command to sort alphabetically. That will sort column A AND it will move the data in other columns as well, keeping everything correctly tied together.
https://www.gcflearnfree.org/excel2016/sorting-data/1/