The standard !pip or %pip installs to the incorrect environment. To install TensorFlow into your Glue Notebook's Python 3.11 kernel, use the following command:
%additional_python_modules tensorflow
Then, run %stop_session in another cell and restart the kernel (by running any cell) to apply the change.