In Apache 2.4.26 and above it's possible to use if else directives, like:
<If "%{HTTP:User-Agent} =~ /(android|blackberry|ipad|iphone|ipod|iemobile|opera\ mobile|palmos|webos|googlebot-mobile)/">
Header add Link "<https://example.com/fonts/font01.woff2>; rel=preload; as=font; type=font/woff2;"...