Ancient-Red-Dragon: There is no universal answer to that. Sometimes you can, and sometimes you can't.
Usually with modern games that were made for consoles, which is most modern games (or so it seems to me), you can, though.
Most likely if the games you are interested in work with a controller, then it will list "Controller Support" as a feature for the GOG store pages of those games.
Conversely, if "Controller Support" is not listed on a game's store page, then controllers probably don't work with that game.
GOG probably doesn't mark games which have e.g. DirectInput gamepad support, as having gamepad support. Those games will still probably run "fine" with modern gamepads which support both XInput and DirectInput, but at the same time those games are also from the era where gamepad support was often just an afterthought in the PC versions, and you were really expected to play the game with the keyboard (and maybe the mouse).
Then there are borderline cases like Prince of Persia: The Sands of Time which, at least last time I tried it, is not fully playable with modern analog gamepads, even if they have DirectInput mode. Reason being that with modern PC gamepads the area of movement is round (just like in consoles), while with the old DirectInput gamepads it was quite often, or even usually, a square. That means you can't reach the diagonal maximums in games like Prince of Persian, meaning that if you run and start turning ("running in a circle") by pushing the analog stick diagonally, suddenly you end up just walking in a circle because the game does not register you pushing the stick diagonally all the way.
(I am not sure if some of the modern gamepads can take that into account somehow, adjusting how the gamepad registers all the analog extremes. That problem existed at least with Logitech F310 which has both DirectInput and XInput modes.)
In such cases, I think it is just better to play the PC version with keyboard+mouse.
EDIT: Well what do you know? Prince of Persia: The Sands of Time does currently list as having controller support? Maybe I need to test it again whether it now works fully with either Logitech F310 or 8Bitdo SN30 Pro+ (both gamepads support both XInput and DirectInput), and you can run in circles now. Maybe it nowadays works ok even with XInput gamepads (like the MS XBox gamepads which don't have DirectInput support)?