Hi Buddy_2020,
it depends on the model of your router and the wi-fi standard used.
If your router uses the 802.11n wi-fi standard it is preferable to buy an 802.11n wi-fi adapter, if your router uses the 802.11ac wi-fi standard it is preferable to buy an 802.11ac wi-fi adapter. The same is true if your router uses the latest 802.11ax wi-fi standard. In any case, all types of wi-fi adapters are backwards compatible whatever the standard used by the router. For perfect compatibility, however, it is preferable to purchase a wi-fi adapter that uses the same wi-fi standard as the router.