How to centre bullet points but maintain alignment?

I saw a forum post about this same issue and copied the HTML code (shown below) but it makes the indented bullets appear centred as well, in a way that looks unnatural.

ul, ol { 
   display: inline-block; 
}

li ul, li ol {
   display: block; /* Ensures proper indentation for nested lists in some edge-cases */
}

Is there any way to fix this?

Try using this:

ul:not(ul ul, ol ul),
ol:not(ul ol, ol ol) { 
  margin: 1em auto;
  width: fit-content;
}