Normally if you run nix search <package>
it will complain about something experimental.
Assuming you read the message and understand what you are getting yourself into, follow the instructions to enable search. Alternatively, you can search on https://search.nixos.org/.
Put the following in ~/.config/nix/nix.conf
experimental-features = nix-command flakes
Now search will work but it will rebuild cache every time you search. To avoid building cache, run nix registry pin nixpkgs
.
Search packages with nix search nixpkgs <package>
.