If I've understood right, you want to use the volume keys to set the display to maximum brightness? Am assuming this is for a Samsung phone running One UI 5.
You could use a routine. Open the Modes and Routines app and tap Routines at the bottom. Click the plus, tap the plus under "if" and scroll down and select button action. Press volume up or down as you want. Then tap plus under "then", tap display, scroll down and tap brightness and set the slider to 100%. Then click save. If you double tap your volume button the display brightness should then be 100%. There may be other ways too but this seems to work on my S23 Ultra.
Just beware setting the brightness at maximum setting for long periods of time may not be good for the display.
Hope this helps.