If you're referring to VRR from the HDMI 2.1a FRL spec (used by eg. OLED TVs), then that is currently only supported for Nvidia cards on Linux. It works with the default configuration after installing the proprietary drivers. I'm currently using this with an LG OLED TV at 4K@120Hz VRR.
For AMD cards, it is currently not supported, though it might be coming soon: https://gitlab.freedesktop.org/drm/amd/-/issues/1417#note_1988469
EDIT: Also, for Nvidia, VRR is technically used/enabled on the wire for both X11 and Wayland, but the refresh rate is locked to the max on Wayland. You'll need to use X11 for the refresh rate to actually be variable.