Hi,
You usually just put the file in the top most folder of your project and when the clang-format or clangd extension is active, the formatter should automatically find your .clang-format file.
Afaict it always searches the folder tree upwards from the to-be-formatted file until it finds a config file (or not).
Cheers