Polish layout for physical USB keyboard in Oreo
edit i am using a nokia 6.1 runing a version of stock android 9 pie

i set my English UK keyboard to polish and Ukrainian layouts i was able to get Ukrainian input working by following this 
cannot change languange on external keyboard

but i could only get a few polish letters to work 
can you type in your native language with the on screen keyboard?

try going to settings and search for languages press languages and input press add language and your language should be there
then try the keyboard again