Yes, you can lock the screen in either Portrait or Landscape or have it rotate. Pull down the quick menu twice to expose all the shortcuts.
If you screen is already locked in one position the icon will look like a pad lock and be labeled with the orientation, either Portrait or Landscape.
If your screen is currently able to rotate and you want to lock it in a specific orientation, turn the phone so that the screen is in the desired orientation and tap the icon. That will lock the screen.
Below is the Auto Rotate icon in all three variations depending on what you've selected.
Galaxy Fold 5 512g(VZW), Galaxy Book (original, VZW), Tab S8 Ultra, Tab S4, Galaxy Watch6Classic 47mm(VZW), Galaxy Watch5Pro(VZW), M8 Smart Monitor