let b:prettier_ft_default_args = {
  \ 'parser': 'yaml',
  \ }

augroup Prettier
  autocmd!
  autocmd BufWritePre *.yaml call prettier#Autoformat()
augroup end

let b:prettier_ft_default_args = {
  \ 'parser': 'yaml',
  \ }

augroup Prettier
  autocmd!
  autocmd BufWritePre *.yml,*.yaml call prettier#Autoformat()
augroup end

Add missing ".yml" in autocmd
Add missing ".yml" in autocmd

prettier/vim-prettier