Slow speed index for my ReactJS website

What does the website slow
The SLL from cyperpanel

Welcome @Eng.Osama Happy you are here

This is vague. What is slow? the database queries, http requests, loading of images and videos ?

When i test the speed website i find the speed index is slow
Also get photos and information from database is slow

This has so little to do with cyberpanel as most of the time the index for js based websites is handicapped by JS execution time. Therefore this is dependent on how code is written, built or compiled. This entirely based on code and nothing else. Employ code splitting and other best practices to your code

Improve mariadb performance by creating or editing nano /home/cyberpanel/.my.cnf e.g. reduce no of maximum connections etc. I advice you check mariadb documentation about this.

then restar mysql service

sudo /etc/init.d/mysql restart

the database queries and loading the photos and videos
Are slow

Avoid spaghetti code and use proper react libraries for data fetching and lazy loading images. Examples would be prisma react components, tanstack query aka react query v4, react image lazy load component etc a quick search engine lookup will point you in the right direction