when I log any string in App component or Quiz component it appears two times in console.
>Solution :
This is because you are using StrictMode, which will cause multiple renders. This in intentionally done to help encourage developers use side effects properly. The double render will only happen in development and not in production.
Also see this answer for more information.
Strict mode is on because you have your components wrapped with <React.StrictMode>:
<React.StrictMode>
<Router>
...
...
</React.StrictMode>
