As Display name is a settings against a numbered list, it can only be changed by a workspace admin. A workspace admin can change the display name from "Display Name" property of the list to blank. Once it is blank, system will show the system generated serial nos.
An end user would not be able to do so as this can be done only by workspace admins.
Can you let me know an instance where you want to use this kind of functionality?
As @ankit_cheeni suggested, you can achieve this in a module to show/ toggle between system generated serial numbers and display name. However, the dimension can show either one - Display Name or Serial No based on the settings at list level.
As @anikdas mentioned, can you please explain where you need this functionality? Do you want to toggle it based on some condition? For example, we can create a Boolean if required; when checked it will toggle to the desired Display Name...
Yes you can achieve it by driving your display Names with Boolean as @anirudh suggested but you can't do much about it on Lists as setting up your display name is admin feature as mentioned by @anikdas
Here is what you can do
1. Create a Boolean formatted line item.
2. Create a module with one text/list formatted line item & dimensioned by Numbered list. Type the names in this module which should be the display names of your numbered list items
3. Go to the Numbered list and write the formula in Display Name property which will read if your Boolean is checked then only Display Name will be shown else IDs will be shown
Here is the output
When Boolean is Checked
When Boolean is not checked
Note: You can optimize it by having list formatted properties here
Question: Why is the need to do so. End users won't be interested and it will not make any meaning to the end users if you try and show them the UIDs. Can you please help us understand why the need