How To Add Google Schema Markup To Custom Websites using jQuery?

I want to add a schema markup to my website which is developed using PHP frame work.
can you tell me how can I add scripts to my custom sites and how to generate those scripts for schema markup in Google SERP.
here you can check Google guideline about schema markup:
https://developers.google.com/search/docs/advanced/structured-data/sd-policies

waiting for your response…

Adding that json information to every page is going to be very specific to the framework which you are using. in any case you will need to identity which parts of your model objects are going to map to the required type attributes. Also how to differentiate between the types in your data set. I would probably start there before writing any code. You need to ask yourself questions like what subset of structured data attributes are you going to concern yourself with. None the less that is pretty fascinating. I haven’t read though that before. I actually added an issue to look into integrating that for a personal project I’m working on with Angular.