Zend certified PHP/Magento developer

Magento 2.4 Change page content based on query string

I want to show custom text on category pages based on query string on category pages.

for example : for category shirt with urls like

  1. category/shirts.html?color=red
  2. category/shirts.html?color=blue

i want to show different text on top of both pages based on color in query string.

What i tried i was able to do this via adding block from layoutxml

Issue Faced for both url 1 and 2 i see content as cached one from first opened url.

adding cacheable=”false” increased loadtime by too much , any workaround for this