local userInputService = game.UserInputService
local imageLabel = script.Parent
local key = Enum.KeyCode.ButtonA
local mappedIcon = userInputService:GetImageForKeyCode(key)
imageLabel.Image = mappedIcon
Printing mappedIcon should output the correct id. If so, then the image most likely can’t be seen on the white canvas. Make it transparent or change the background colour, and configure the frame colour/opacity too.
The default icons are white for easier costumization.