What kind of geodatabase?
If it's a mobile or enterprise geodatabase, it could be done in a SQL database view. And then you could join from the FC to the view and use the field calculator to populate the ID field in the FC.
Mobile geodatabase (SQLite):
select
c.*,
row_number() over (order by population_2021 desc) as sorted_id
from
cities c
(File geodatabases don't have a row_number() function.)
If it's a file geodatabase (or any kind of geodatabase), you could use the Sort geoprocessing tool in conjunction with a join.
Like this:
In hindsight, I could have joined on Objectid=OrigFID, instead of using my temp_unique_id field.
ArcGIS Pro 3.2.1