I’ve done this many times with different combinations of onions and leeks.
This version I used only one large sweet onion and two cloves of garlic.
Slice onion into thin pieces. Chop garlic.
Saute in olive oil for at least 30 minutes until onion turns brown.
Prepare crust (I used store bought thin crust).
Top crust with grated mozzarella cheese, about 3 ounces and a couple of teaspoons grated parmesan cheese.
Add onions to pizza crust.
I did the same with the second crust from package but just sprinkled with red pepper flakes.
Bake in 425F oven for 9 minutes.