I would say the symptoms appeared not more than a month ago? (About the time when I tried changing my devices' port to one another?)
Why did you decide to change the USB ports the two devices were plugged into? What triggered that motivation? What was wrong with just still using the old USB ports?
And now, even when you return to using the original USB ports before you changed things, the previous problem-free performance has not also returned as you'd expect (especially if the current problem is somehow related to the USB ports being used)?
I don't think it's a problem concerning my mouse and keyboard, I would say it would come from my computer (ports maybe? I'm not an expert).
Well, if you were using these very same mouse and keyboard devices before a month ago and were problem free, and only after for some reason changing things to use different USB ports a month ago did your current problems appear, I'd agree with you that it seems more likely something tied to your computer itself (and its USB ports) than some recent hardware deterioration of your mouse and/or keyboard.
I tried to do test runs myself before posting to see what was going on at it appears that when I plug my devices in certain usb ports they respond normally (I can use it to input my password in the windows account log in) but when I change the port they are using (for the keyboard, not the mouse) I have to wait for windows to have launched and to have turned on Razer Synapse (razor material app) so that I can use the keyboard like I would be able to (guessing Razer Synapse acts like a kind of driver).
This is not entirely surprising, and may also well explain your current symptoms.
And the "solution" might truly be just to go back to the original USB ports you were using originally (although your choice back then may have been just a fortuitous accident, which luckily was correct). More below.
I have two ports on the top of my tower and the rest of usb ports I used are at the back of the computer.
Are the front ports USB 2.0 or USB 3.0? Same with the back ports. You can tell from the motherboard manual, and which onboard USB header connectors you used to connect to the USB ports on your case.
Or, you can just look at the USB ports themselves. USB 2.0 ports typically have a "black tongue" inside the socket, whereas USB 3.0 ports typically have a "blue tongue" inside the socket. This is by design, so that you can visually see that they are different and so that you will use whichever one is appropriate for the USB device you're connecting. Other than that the physical size and shape of the sockets is the same.
There's a similar color-coded difference between a USB 2.0 cable and USB 3.0 cable, where again there is either a black or blue visible "lip" on the connector at the end of the cable. Again, that's by design to make things easier for you to keep track of.
USB 3.0 ports are fully compatible with USB 2.0 devices or USB 3.0 devices. But USB 2.0 devices can only provide USB 2.0 performance, even if you plug a USB 3.0 device into it. Actually, you'll probably get some type of popup message from Windows about "better performance can be obtained if you use a USB 3.0 port", if you plug a USB 3.0 device into a USB 2.0 port.
Now on the ASUS motherboards (I have a P8Z77-V Pro), there is a stated difference between the various USB connectors on the back of the board. Not only are there USB 2.0 and USB 3.0 ports, but there is also a "special USB BIOS flashback port" (surrounded by a green color fringe) which has a special purpose.
On my machine I've also installed the optional USB connector bracket to provide additional USB 2.0 ports for my other USB 2.0 devices, so as to allow the USB 3.0 connectors to be used for USB 3.0 devices.
Anyway, because of some oddity with using all of these USB ports, I am unable to use one of them (the upper USB 3.0 port shown as "11" in the above picture, just below the LAN port) for a USB 3.0 device. In fact, if I use it at all my machine then malfunctions (although I cannot remember the exact symptom, whether it's to lose USB ports or to lose something else unrelated to USB... can't recall, it's been a long time). So to this day, it's just open and unused with nothing connected to it, and consequently my machine is happily running without any problems.
My point is that you might have stumbled into a similar problem, trying to use the complete set of USB ports you assumed were all available (as I did), only to have run into what I would call a motherboard oddity tied to using that particular USB port. And it might well be that one of the USB ports is not enabled and available until after Windows starts and the USB driver software enables things, whereas others are always available (e.g. for when talking to the BIOS in Setup, pre-Windows).
So, I would suggest trying to find some other USB 2.0 ports that you can plug your mouse and keyboard into than the ones you've determined are causing your symptom. Do you have other spare USB ports you can use? You might even try the front ports on your case (even if they can support USB 3.0), just for this experiment. Does your problem symptom still occur? If you're strapped for USB ports, can you maybe give up just one on the front for the experiment (or forever, if it solves your problem)?
I'm just suggesting you find a solution, even if the problem comes from ASUS.