Hey you seem puzzled by the Republic vs democracy concepts so I’ll throw you a bone. Here’s a clear explainer that will solve your confusion:
https://www.merriam-webster.com/grammar/democracy-and-republ...If you don’t have time to read it, the short answer is the USA is both a republic and democracy!