Check out example codes for "how to add google fonts to css in react". It will help you in understanding the concepts better.

Code Example 1

@import url('https://fonts.googleapis.com/css2?family=Prompt:[email protected]&display=swap');
at the top of css file

Learn ReactJs, React Native from akashmittal.com