(1) Explain your problem, don't simply post "This isn't working". What were you doing when you faced the problem? What have you tried to resolve - did you look for a solution using "Search" ? Has it happened just once or several times?
(2) It's also good to get feedback when a solution is found, return to the original post to explain how it was resolved so that more people can also use the results.
I am not a P6 user but read a little about it. Maybe the issue is in the settings.
Oracle Primavera P6 Professional Help Version 21
Leveling priority definitions
Projects typically contain more than one chain of activities. If two activities from different chains are ready for leveling, P6 Professional chooses one using the priorities you specify in the Leveling Priorities area of the Level Resources dialog box. Then, it sorts numbers first, then alphabetic characters, followed by blank values. If you specify no prioritization codes, P6 Professional sorts by activity ID.
The following table defines your priority and order options for leveling resources to meet customer requirements.
Priority
Ascending
Descending
Activity ID
Levels activities with lower IDs first.
Levels activities with higher IDs first.
Activity Priority
Levels lower priority activities first.
Levels higher priority activities first.
Early Finish
Levels activities with earlier, early finish dates first.
Levels activities with later, early finish dates first
…………
Using Resource Leveling in Primavera P6 Scheduling Software
Make sure your first option is Activity Priority field.
The following reference might also help.
P6 - Reviewing_Resource_Leveled_Schedules.pdf
Good Luck,
Rafael