how do I get the search bar by pressing F3 on my mac
The shortcut for macOS is Fn+F3. This Apple support article explains when and why the Fn is required.


  Use standard function keys
  
  Standard function keys work differently depending on the app and the keyboard shortcuts that you've set up. Some apps have their own keyboard shortcut preferences that you can customize.
  
  To use the standard function keys, hold the Fn (Function) key when pressing a function key. For example, pressing both Fn and F12 (speaker icon) performs the action assigned to the F12 key instead of raising the volume of your speakers. 
  
  If your keyboard doesn’t have an Fn key, try pressing and holding the Control key when pressing a function key.