Where did you get that the high byte of $010B is the level number? The level number stored in $010B is 16-bit, I commented what you're code is actually currently doing:
Code
main:
REP #$20 ; Make the accumulator 16-bit.
LDA $010B ; Load a 16-Bit address. (for example: 0105)
XBA ; Here you switch high and low byte, A now contains 0501
SEP #$20 ; so get rid of the useless low byte. (This gets rid of the high byte)
CMP #$01 ; This therefore checks if the high byte of the level is 1 (if the level is in the 100-1FF range)
BEQ Lvl_1 ; If so, increment the level number.
DEC ; A now contains 0
XBA ; this swaps A which currently contains [05]00 back to [00]05
STA $010B ; Put the address back. (since A is 8-bit here, this puts back the 05 into $010B which it already contained)
RTL ; Return.
Lvl_1:
INC ; A was checked to be 0 here, now contains 1
XBA ; same as above, this swaps A which now contains [05]01 back to [01]05
STA $010B ; since A is only 8 bit here, only the 05 is stored back, which was the value this address contained to begin with
RTL
So in the end the code essentially does nothing. What you would want to do is check the entire thing in 16-bit or only modify the low byte, without doing XBA at all.
And finally, while that code would work logic wise with a few changes, $010B is a backup of the level number added by various tools so they can read it, it does not actually affect which level is loaded at all, doing that is unfortunately not as trivial as writing the level somewhere. If that is what you're trying to accomplish then that won't be as easy as changing the level number during load.