Click the 4 way arrow in the top left corner of BOM.
in the settings which pop up find Item numbers
there is a lock icon that says "Do not change item numbers."
if it is checked it will not re number components.
This may or may not solve your problem, but it is part of mine.
I'm not sure what you mean by "sorted itself automatically".
If you updated part properties, then I believe the BOM would only "sort itself" if the BOM is set to sort on one of the columns for these properties, instead of Item No.
If so, try right-clicking a BOM column and click "Sort", set your sort settings and check save sort then OK.
If you added parts to the assembly, and the sort is the default Item No. column, then perhaps "Follow assembly order" or "Do not Item numbers" has changed from a previous setting.
I mean by automatic, automatic without me doing anything, without me rmb and selecting sort. I had my bom to sort on part no., and as I was going through the parts in the bom, updating the parts numbers. As I would enter a part number in a part properties, return to the assembly drawing, hit Ctrl-B, the bom would automatically re-sort itself correctly according to part number. I had never seen it do that before without having to manually do a "apply saved sort scheme". I know there is an "automatic update bom" option in preferences, but I have no idea how I turned on (and subsequently turned off) automatic sorting.