The way mainstream publications refer to the two big 20th century wars is in this way: World War I and World War II, using one capital I and two capital Is.
The capital I is the same as the Roman numeral I for “one” and Roman numeral II for “two”.
It’s not: the first world war or the 2nd world war or World War 1 or World War 2 or WW1 or WW2. And it’s not WWI and WWII the first time you use it…first time you must spell it out. Why? I have no idea. But I suggest it’s best to follow the convention of most mainstream publications.
If you refer to both wars write “both world wars” with small Ws. (The Great War was the name of the first world war in 1914-18, but after a second world war in 1939-45, the expression The Great War was dropped.) In America and Australia, the Vietnam War is capital V, capital W. But in the country of Vietnam that war is called “the American War”.