Creating Database Automatically in .Net Core 8 Issue

I’m using .net core 8 and Hangfire v 1.8, and I want to create database automatically when I run project,
I tried many ways as (GlobalConfiguration) and it doesn’t create automatically.
I need an example for creating database automatically.