Wi-fi unstable in Ubuntu MATE 22.04

Hello Ubuntu MATE forums. I have been using Ubuntu mate since 2016 on a PC. I recently got a new laptop and installed Ubuntu MATE 22.04 on it. However, wi-fi is unstable. By unstable I mean that it disconnects every 5 minutes and it asks for my password again and again. My wi-fi card is Realtek RTL8821CE. I would really appreciate some help because it has started to get on my nerves.

I have that same card in 2 of my laptops. I have no problems with them.

Have you tested with a different wifi access point, such as a coffee shop or at a friend's house?

Actually I have 2 wi-fi access pints in my house.One is the router and the other is an extender. The router is actually stable. Thanks for letting me know!