Apparently sometimes you can buy an upgrade for less than upgrading before the cruise. They use a chart and you have to pay based on your original booking and category.
HOWEVER, I have done 4
DCL cruises so far and every time, there has been a “Captain Mickey has informed us that this sailing is full” sign up at check-in - meaning no upgrades. So that is the chance you take by waiting to the port - IF they have any you can buy them if you are early enough; but you may be the first person checked in and there are none available.
Bottom line is - there is never a guarantee that any upgrades will be available for purchase at the port. So if you see a cabin at a higher level that you want and will not be happy if you get “stuck” in your initially selected category as opposed to this higher level cabin, you should change in advance because they may not be offering any at the port.